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:
parent
28e5751542
commit
2046802ec5
1 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue