Skip to content

Commit

Permalink
Do not run "Check for default SS user" and "Check for SS user" when a…
Browse files Browse the repository at this point in the history
…rchivematica_src_configure_ss is false
  • Loading branch information
Silvan Raijer authored and mamedin committed Feb 13, 2020
1 parent 3cee628 commit 3f8013a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down

0 comments on commit 3f8013a

Please sign in to comment.