staging-sync/db-sync: Fix the condition to ensure the server is defined and not null

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-09-16 11:57:22 +02:00
parent cf31e3f0c8
commit f755eef97f

View file

@ -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"