Stack Status
This commit is contained in:
27
examples/004_services/playbooks/stack_status.yml
Normal file
27
examples/004_services/playbooks/stack_status.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
- hosts: loadbalancer
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: verify nginx service
|
||||||
|
command: service nginx status
|
||||||
|
|
||||||
|
- name: verify nginx is listening on 80
|
||||||
|
wait_for: port=80 timeout=1
|
||||||
|
|
||||||
|
- hosts: webserver
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: verify apache2 service
|
||||||
|
command: service apache2 status
|
||||||
|
|
||||||
|
- name: verify apache2 is listening on 80
|
||||||
|
wait_for: port=80 timeout=1
|
||||||
|
|
||||||
|
- hosts: database
|
||||||
|
become: true
|
||||||
|
tasks:
|
||||||
|
- name: verify mysql service
|
||||||
|
command: service mysql status
|
||||||
|
|
||||||
|
- name: verify mysql is listening on 3306
|
||||||
|
wait_for: port=3306 timeout=1
|
||||||
5
examples/004_services/site.yml
Normal file
5
examples/004_services/site.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- ansible.builtin.import_playbook: database.yml
|
||||||
|
- ansible.builtin.import_playbook: webserver.yml
|
||||||
|
- ansible.builtin.import_playbook: loadbalancer.yml
|
||||||
|
- ansible.builtin.import_playbook: playbooks/stack_status.yml
|
||||||
Reference in New Issue
Block a user