Skip to content

Commit

Permalink
Add caution about handlers & import to Pitfalls (ansible#61060)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
lcts authored and acozine committed Sep 5, 2019
1 parent ce8af1c commit 375eb97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/docsite/rst/user_guide/playbooks_reuse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 375eb97

Please sign in to comment.