mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #12849 from bborysenko/docsite/handlers_order
Fix order of handlers that were notified in different sections
This commit is contained in:
commit
63a1416754
1 changed files with 9 additions and 7 deletions
|
@ -387,10 +387,12 @@ won't need them for much else.
|
||||||
* If two handler tasks have the same name, only one will run.
|
* If two handler tasks have the same name, only one will run.
|
||||||
`* <https://github.com/ansible/ansible/issues/4943>`_
|
`* <https://github.com/ansible/ansible/issues/4943>`_
|
||||||
|
|
||||||
Roles are described later on. It's worthwhile to point out that handlers are
|
Roles are described later on, but it's worthwhile to point out that:
|
||||||
automatically processed between ``pre_tasks``, ``roles``, ``tasks``, and ``post_tasks``
|
|
||||||
sections. If you ever want to flush all the handler commands immediately though,
|
* handlers notified within ``pre_tasks``, ``tasks``, and ``post_tasks`` sections are automatically flushed in the end of section where they were notified;
|
||||||
in 1.2 and later, you can::
|
* handlers notified within ``roles`` section are automatically flushed in the end of ``tasks`` section, but before any ``tasks`` handlers.
|
||||||
|
|
||||||
|
If you ever want to flush all the handler commands immediately though, in 1.2 and later, you can::
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- shell: some tasks go here
|
- shell: some tasks go here
|
||||||
|
|
Loading…
Reference in a new issue