staging-sync/db-sync: stop apache after having dumped the prod db
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
ca8130bdca
commit
c3ad168fb0
1 changed files with 14 additions and 14 deletions
|
@ -13,20 +13,6 @@
|
||||||
# Can be a full hostname (foo01.iad2.fp.o) or a group, foo-stg
|
# Can be a full hostname (foo01.iad2.fp.o) or a group, foo-stg
|
||||||
# db => The database name on both database server (must be the same)
|
# db => The database name on both database server (must be the same)
|
||||||
|
|
||||||
- name: bring staging services down
|
|
||||||
hosts: "{{ server }}"
|
|
||||||
user: root
|
|
||||||
when: server is defined
|
|
||||||
vars_files:
|
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
|
||||||
- "/srv/private/ansible/vars.yml"
|
|
||||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
||||||
handlers:
|
|
||||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- service: name=httpd state=stopped
|
|
||||||
|
|
||||||
- name: dump the prod db out
|
- name: dump the prod db out
|
||||||
hosts: "{{ dbhost }}.iad2.fedoraproject.org"
|
hosts: "{{ dbhost }}.iad2.fedoraproject.org"
|
||||||
user: root
|
user: root
|
||||||
|
@ -51,6 +37,20 @@
|
||||||
dest: /var/tmp/
|
dest: /var/tmp/
|
||||||
flat: yes
|
flat: yes
|
||||||
|
|
||||||
|
- name: bring staging services down
|
||||||
|
hosts: "{{ server }}"
|
||||||
|
user: root
|
||||||
|
when: server is defined
|
||||||
|
vars_files:
|
||||||
|
- /srv/web/infra/ansible/vars/global.yml
|
||||||
|
- "/srv/private/ansible/vars.yml"
|
||||||
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||||
|
handlers:
|
||||||
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- service: name=httpd state=stopped
|
||||||
|
|
||||||
- name: drop and re-create the staging db entirely
|
- name: drop and re-create the staging db entirely
|
||||||
hosts: "{{ dbhost }}.stg.iad2.fedoraproject.org"
|
hosts: "{{ dbhost }}.stg.iad2.fedoraproject.org"
|
||||||
user: root
|
user: root
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue