|
|
@ -46,7 +46,7 @@ This playbook, ``verify-apache.yml``, contains a single play with a handler.
|
|
|
|
name: httpd
|
|
|
|
name: httpd
|
|
|
|
state: restarted
|
|
|
|
state: restarted
|
|
|
|
|
|
|
|
|
|
|
|
In this example playbook, the second task notifies the handler. A single task can notify more than one handler.
|
|
|
|
In this example playbook, the second task notifies the handler. A single task can notify more than one handler:
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
|
|
|
@ -120,6 +120,7 @@ Handlers can also "listen" to generic topics, and tasks can notify those topics
|
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handlers:
|
|
|
|
handlers:
|
|
|
|
- name: Restart memcached
|
|
|
|
- name: Restart memcached
|
|
|
|
ansible.builtin.service:
|
|
|
|
ansible.builtin.service:
|
|
|
|