# clarification about using notify in the context of include\_tasks

**URL:** <https://forum.ansible.com/t/clarification-about-using-notify-in-the-context-of-include-tasks/25862>\
**Category:** Ansible Project\
**Created:** [October 30, 2017, 10:13am UTC](https://forum.ansible.com/t/clarification-about-using-notify-in-the-context-of-include-tasks/25862 "2017-10-30T10:13:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nusenu](https://avatars.discourse-cdn.com/v4/letter/n/4da419/32.png) [@nusenu](https://forum.ansible.com/u/nusenu)\
**Post date:** [October 30, 2017, 10:13am UTC](https://forum.ansible.com/t/clarification-about-using-notify-in-the-context-of-include-tasks/25862/1 "2017-10-30T10:13:00Z")

</div>

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](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](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](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
