From f755eef97fe8dd523a42749ac8acb05f1d84fdf9 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Wed, 16 Sep 2020 11:57:22 +0200 Subject: [PATCH] staging-sync/db-sync: Fix the condition to ensure the server is defined and not null Signed-off-by: Pierre-Yves Chibon --- playbooks/manual/staging-sync/db-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/manual/staging-sync/db-sync.yml b/playbooks/manual/staging-sync/db-sync.yml index 0635af59f0..7e20f7896d 100644 --- a/playbooks/manual/staging-sync/db-sync.yml +++ b/playbooks/manual/staging-sync/db-sync.yml @@ -51,7 +51,7 @@ tasks: - service: name=httpd state=stopped - when: server is defined + when: (server is defined) and (server|length > 0) - name: drop and re-create the staging db entirely hosts: "{{ dbhost }}.stg.iad2.fedoraproject.org" @@ -95,7 +95,7 @@ tasks: - service: name=httpd state=started - when: server is defined + when: (server is defined) and (server|length > 0) - name: Remove the prod db dump now that we are done hosts: "{{ dbhost }}.iad2.fedoraproject.org"