# Notify from inside task inclusions ?

**URL:** <https://forum.ansible.com/t/notify-from-inside-task-inclusions/11671>\
**Category:** Ansible Project\
**Created:** [July 12, 2012, 6:31pm UTC](https://forum.ansible.com/t/notify-from-inside-task-inclusions/11671 "2012-07-12T18:31:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ansibleguest](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@ansibleguest](https://forum.ansible.com/u/ansibleguest)\
**Post date:** [July 12, 2012, 6:31pm UTC](https://forum.ansible.com/t/notify-from-inside-task-inclusions/11671/1 "2012-07-12T18:31:06Z")

</div>

I tested the new tags option. Works fine and only the tasks tagged are  
invoked 🙂  
Unfortunately i learned the notify doesnt seem to work when the task  
is within an include  
and the handler is in the above playbook ?

playbook.yml  
...  
- include: tasks/license.yml tags=license  
...

tasks/license.yml  
- action: copy src=files/license.cfg dest=$license  
&nbsp;&nbsp;notify:  
&nbsp;&nbsp;- stop product  
&nbsp;&nbsp;- start product

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 12, 2012, 6:37pm UTC](https://forum.ansible.com/t/notify-from-inside-task-inclusions/11671/2 "2012-07-12T18:37:29Z")

</div>

hmm, I’ll have to investigate this

All the tasks should be parsed ahead of that execution path, and handlers don’t have tag semantics, so that is expected to work and I’m not quite sure why it would be doing that.

Does this happen when you don’t specify --tags?

---

<div class="post-metadata">

**Author:** ![ansibleguest](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@ansibleguest](https://forum.ansible.com/u/ansibleguest)\
**Post date:** [July 12, 2012, 6:59pm UTC](https://forum.ansible.com/t/notify-from-inside-task-inclusions/11671/3 "2012-07-12T18:59:58Z")

</div>

I took out all the tags and the notify came ok from within the  
included tasks file.  
May be extend the log to see which task has triggered a notify ?

TASK: [copy src=files/license.cfg dest=$license] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [10.101.1.147]

- Btw. after a line with skipping there is a newline too much in the  
output:

&nbsp;&nbsp;TASK: [command tar -zxf $basedir/$package -C $basedir/$product]
