Added all files
This commit is contained in:
5
examples/006_notify_handlers/playbook/hostname.yml
Normal file
5
examples/006_notify_handlers/playbook/hostname.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: get server hostname
|
||||
command: hostname
|
||||
28
examples/006_notify_handlers/playbook/stack_restart.yml
Normal file
28
examples/006_notify_handlers/playbook/stack_restart.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
# Bring stack down
|
||||
- hosts: loadbalancer
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=nginx state=stopped
|
||||
|
||||
- hosts: webserver
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=apache2 state=stopped
|
||||
|
||||
# Restart mysql
|
||||
- hosts: database
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=mysql state=restarted
|
||||
|
||||
# Bring stack up
|
||||
- hosts: webserver
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=apache2 state=started
|
||||
|
||||
- hosts: loadbalancer
|
||||
become: true
|
||||
tasks:
|
||||
- service: name=nginx state=started
|
||||
Reference in New Issue
Block a user