From 52e636b8e572b5ab1bbc26c202ea00510f71d34c Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Tue, 12 May 2026 17:48:29 +0200 Subject: [PATCH] Handlers --- examples/004_services/playbooks/stack_restart.yml | 2 +- examples/004_services/playbooks/stack_stopped.yml | 2 +- examples/006_notify_handlers/hosts | 8 ++++++++ examples/006_notify_handlers/webserver.yml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 examples/006_notify_handlers/hosts diff --git a/examples/004_services/playbooks/stack_restart.yml b/examples/004_services/playbooks/stack_restart.yml index fbfb979..1df6489 100644 --- a/examples/004_services/playbooks/stack_restart.yml +++ b/examples/004_services/playbooks/stack_restart.yml @@ -15,4 +15,4 @@ become: true tasks: - name: reiniciar apache - service: name=apache2 state=restarted + service: name=apache2 state=restarted \ No newline at end of file diff --git a/examples/004_services/playbooks/stack_stopped.yml b/examples/004_services/playbooks/stack_stopped.yml index 88e2354..36a4ec4 100644 --- a/examples/004_services/playbooks/stack_stopped.yml +++ b/examples/004_services/playbooks/stack_stopped.yml @@ -15,4 +15,4 @@ become: true tasks: - name: parar apache - service: name=apache2 state=stopped + service: name=apache2 state=stopped \ No newline at end of file diff --git a/examples/006_notify_handlers/hosts b/examples/006_notify_handlers/hosts new file mode 100644 index 0000000..0432cdd --- /dev/null +++ b/examples/006_notify_handlers/hosts @@ -0,0 +1,8 @@ +[database] +192.168.11.20 + +[loadbalancer] +192.168.11.30 + +[webserver] +192.168.11.40 \ No newline at end of file diff --git a/examples/006_notify_handlers/webserver.yml b/examples/006_notify_handlers/webserver.yml index 6c7f752..8e9328c 100644 --- a/examples/006_notify_handlers/webserver.yml +++ b/examples/006_notify_handlers/webserver.yml @@ -7,7 +7,7 @@ with_items: - apache2 - libapache2-mod-wsgi-py3 - - python-pip-whl + - python3-pip-whl - python3-virtualenv - name: ensure apache2 started