staging-sync/db-sync: yet another attempt to make the server argument optional

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-09-16 11:47:28 +02:00
parent 28e5751542
commit 2046802ec5

View file

@ -38,7 +38,7 @@
flat: yes
- name: bring staging services down
hosts: "{{ server }}"
hosts: "{{ server or batcave }}"
user: root
any_errors_fatal: false
vars_files:
@ -50,6 +50,7 @@
tasks:
- service: name=httpd state=stopped
when: server is defined
- name: drop and re-create the staging db entirely
hosts: "{{ dbhost }}.stg.iad2.fedoraproject.org"
@ -80,7 +81,7 @@
shell: cat /var/tmp/{{ db }}.dump | psql {{ db }}
- name: bring staging services up
hosts: "{{ server }}"
hosts: "{{ server or batcave }}"
user: root
any_errors_fatal: false
vars_files:
@ -92,6 +93,7 @@
tasks:
- service: name=httpd state=started
when: server is defined
- name: Remove the prod db dump now that we are done
hosts: "{{ dbhost }}.iad2.fedoraproject.org"