Added all files
This commit is contained in:
33
examples/018_site_yml/playbooks/stack_restart.yml
Normal file
33
examples/018_site_yml/playbooks/stack_restart.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
# Bring stack down
|
||||
- hosts: loadbalancer
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=nginx state=stopped
|
||||
- wait_for: port=80 state=drained
|
||||
|
||||
- hosts: webserver
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=apache2 state=stopped
|
||||
- wait_for: port=80 state=stopped
|
||||
|
||||
# Restart mysql
|
||||
- hosts: database
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=mysql state=restarted
|
||||
- wait_for: port=3306 state=started
|
||||
|
||||
# Bring stack up
|
||||
- hosts: webserver
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=apache2 state=started
|
||||
- wait_for: port=80
|
||||
|
||||
- hosts: loadbalancer
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=nginx state=started
|
||||
- wait_for: port=80
|
||||
Reference in New Issue
Block a user