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


-- 
https://mastodon.social/@nusenu
twitter: @nusenu_

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4f4e997a-36d4-88e6-84e1-010cd0cac5de%40riseup.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to