Added all files
This commit is contained in:
5
examples/004_services/playbooks/hostname.yml
Normal file
5
examples/004_services/playbooks/hostname.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: get server hostname
|
||||
command: hostname
|
||||
18
examples/004_services/playbooks/stack_restart.yml
Normal file
18
examples/004_services/playbooks/stack_restart.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- hosts: database
|
||||
become: true
|
||||
tasks:
|
||||
- name: reiniciar mysql
|
||||
service: name=mysql state=restarted
|
||||
|
||||
- hosts: loadbalancer
|
||||
become: true
|
||||
tasks:
|
||||
- name: reiniciar nginx
|
||||
service: name=nginx state=restarted
|
||||
|
||||
- hosts: webserver
|
||||
become: true
|
||||
tasks:
|
||||
- name: reiniciar apache
|
||||
service: name=apache2 state=restarted
|
||||
17
examples/004_services/playbooks/stack_restart.yml.save
Normal file
17
examples/004_services/playbooks/stack_restart.yml.save
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- hosts: database
|
||||
become: true
|
||||
tasks:
|
||||
- name: reiniciar mysql
|
||||
service: name=mysql state=restarted
|
||||
|
||||
- hosts: loadbalancer
|
||||
become: true
|
||||
tasks:
|
||||
- name: reiniciar nginx
|
||||
service: name=nginx state=restarted
|
||||
|
||||
- hosts: webserver
|
||||
become: true
|
||||
tasks:
|
||||
service: name=apache2 state=restarted
|
||||
18
examples/004_services/playbooks/stack_stopped.yml
Normal file
18
examples/004_services/playbooks/stack_stopped.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- hosts: database
|
||||
become: true
|
||||
tasks:
|
||||
- name: parar mysql
|
||||
service: name=mysql state=stopped
|
||||
|
||||
- hosts: loadbalancer
|
||||
become: true
|
||||
tasks:
|
||||
- name: parar nginx
|
||||
service: name=nginx state=stopped
|
||||
|
||||
- hosts: webserver
|
||||
become: true
|
||||
tasks:
|
||||
- name: parar apache
|
||||
service: name=apache2 state=stopped
|
||||
Reference in New Issue
Block a user