Add caution about handlers & import to Pitfalls (#61060)

* Add caution about handlers & import to Pitfalls on the playbooks_reuse page.
The fact that handlers lose their name: when using import_tasks:, while logical, is not intuitive and should be noted.
Co-Authored-By: Sandra McCann <samccann@redhat.com>

(cherry picked from commit 375eb9723a)
pull/62162/head
Christopher Engelhard 5 years ago committed by Toshio Kuratomi
parent 8d5ded4cec
commit 35109ed67e

@ -63,6 +63,7 @@ Using ``import*`` can also have some limitations when compared to dynamic includ
* As noted above, loops cannot be used with imports at all.
* When using variables for the target file or role name, variables from inventory sources (host/group vars, etc.) cannot be used.
* Handlers using ``import*`` will not be triggered when notified by their name, as importing overwrites the handler's named task with the imported task list.
.. note::
Regarding the use of ``notify`` for dynamic tasks: it is still possible to trigger the dynamic include itself, which would result in all tasks within the include being run.

Loading…
Cancel
Save