document that handler can not run include_role and import_role (#72744)

Warn the users until issue #20493 is fixed.
This commit is contained in:
Simon Heimberg 2020-12-01 17:15:46 +01:00 committed by GitHub
parent 276ad4f8f5
commit 79fb065d16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View file

@ -140,6 +140,7 @@ a shared source like Galaxy).
* Use unique handler names. If you trigger more than one handler with the same name, the first one(s) get overwritten. Only the last one defined will run.
* You can notify a handler defined inside a static include.
* You cannot notify a handler defined inside a dynamic include.
* A handler can not run import_role or include_role.
When using handlers within roles, note that:

View file

@ -17,6 +17,7 @@ description:
between other tasks of the play.
- Most keywords, loops and conditionals will only be applied to the imported tasks, not to this statement itself. If
you want the opposite behavior, use M(ansible.builtin.include_role) instead.
- Does not work in handlers.
version_added: '2.4'
options:
name:

View file

@ -20,6 +20,7 @@ description:
- To apply keywords to the tasks within the role, pass them using the C(apply) option or use M(ansible.builtin.import_role) instead.
- Ignores some keywords, like C(until) and C(retries).
- This module is also supported for Windows targets.
- Does not work in handlers.
version_added: "2.2"
options:
apply: