Deploy and stack status

This commit is contained in:
Guillem Hernandez Sola
2025-11-18 13:42:33 +00:00
parent 581e3b2a9f
commit c98bfc32dd
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
# import_playbook soporta handlers correctamente.
# Por lo tanto, este playbook importa otros playbooks que contienen handlers.
- import_playbook: site.yml
- import_playbook: stack_status.yml

View 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=3
- 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=3
- 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=3