From 85fd104dff593f754f9f854b02fedd39932cc937 Mon Sep 17 00:00:00 2001 From: Silvan Raijer Date: Thu, 6 Feb 2020 11:43:49 +0100 Subject: [PATCH] Do not run "Check Dashboard SS url" and "Check Dashboard user" when archivematica_src_configure_dashboard is false --- tasks/configure.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index ea144d79..0950fb6d 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -85,19 +85,21 @@ become: "yes" command: mysql {{ archivematica_src_am_db_name }} -Ns -e "select * from DashboardSettings where name='storage_service_url'" register: dashboard_ss_url + when: archivematica_src_configure_dashboard|bool - debug: msg: "The pipeline is already configured: The dashboard superuser will not be created and the pipeline will not be registered." - when: dashboard_ss_url.stdout != "" and archivematica_src_configure_dashboard|bool + when: archivematica_src_configure_dashboard|bool and dashboard_ss_url.stdout != "" - name: Check Dashboard user become: "yes" command: mysql {{ archivematica_src_am_db_name }} -Ns -e "select * from auth_user where username='{{ archivematica_src_configure_am_user }}'" register: dashboard_user + when: archivematica_src_configure_dashboard|bool - debug: msg: "The dashboard user {{ archivematica_src_configure_am_user }} is already configured: The dashboard superuser will not be created and the pipeline will not be registered." - when: dashboard_user.stdout != "" and archivematica_src_configure_dashboard|bool + when: archivematica_src_configure_dashboard|bool and dashboard_user.stdout != "" # Create api-key if not defined - set_fact: archivematica_src_configure_am_api_key={{ 999999999999999999998 | random | to_uuid | hash('md5') }}