From 3f8013a98102820b6e33a29b5b5b3004eed88ad6 Mon Sep 17 00:00:00 2001 From: Silvan Raijer Date: Thu, 6 Feb 2020 16:38:37 +0100 Subject: [PATCH] Do not run "Check for default SS user" and "Check for SS user" when archivematica_src_configure_ss is false --- tasks/configure.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index c69e878b..9035c168 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -30,12 +30,11 @@ executable: /bin/bash environment: "{{ archivematica_src_ss_environment }}" register: ss_default_test_user + when: archivematica_src_configure_ss|bool - debug: msg: "The SS default test user is already configured and never was used: this user will be deleted." - when: - - ss_default_test_user.stdout != "" - - archivematica_src_configure_ss|bool + when: archivematica_src_configure_ss|bool and ss_default_test_user.stdout != "" # Delete default SS superuser test - name: "Delete default SS superuser" @@ -56,13 +55,11 @@ executable: /bin/bash environment: "{{ archivematica_src_ss_environment }}" register: ss_user + when: archivematica_src_configure_ss|bool - debug: msg: "The SS user {{ archivematica_src_configure_ss_user }} is already configured: The SS superuser will not be created." - when: ss_user.stdout != "" and archivematica_src_configure_ss|bool - - (ss_user.stdout != "" or ss_user_my.stdout != "") - - archivematica_src_configure_ss|bool - + when: archivematica_src_configure_ss|bool and ss_user.stdout != "" - name: "Create SS superuser" django_manage: