Hi,
I'm in the process of migrating from "include" to import_* and include_* 's.
During that the following question came up:
Could I replace an include [1] with include_tasks even if the included
file makes use of notify [2]?
[1] https://github.com/nusenu/ansible-relayor/blob/master/tasks/main.yml#L55
[2]
https://github.com/nusenu/ansible-relayor/blob/master/tasks/apt_prepare.yml#L7
The question came up because of these sentences in the documentation:
https://docs.ansible.com/ansible/latest/playbooks_reuse.html writes:
You cannot use notify to trigger a handler name which comes from
inside a dynamic include (see note below).
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.
I shortly tried include_tasks on that task (currently using include) and
it worked fine, but I wanted to make sure this is supported since the
documentation is not very clear about that.
thanks,
nusenu