Notify from inside task inclusions ?

I tested the new tags option. Works fine and only the tasks tagged are
invoked :slight_smile:
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
  notify:
  - stop product
  - start product

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?

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:

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