Dynamic Includes: assigning dynamic tags to included files

Hi,

I’m using dynamic includes and wonder if there is a way to dynamically tag them.

The following usage of ‘tags’:

`

  • include: ‘{{ item }}.yml’
    tags: ‘{{ item }}’
    with_items:
  • a
  • b
  • c
    `

results in an error:

ERROR! 'item' is undefined

I would expect the tasks in each included file to be tagged respectively ‘a’, ‘b’ and ‘c’.

without tags: ‘{{ item }}’ this works as expected.

Maybe there is another way to tag all tasks inside an included file without specifying the tag for each task?

Thanks,
rszalski

tags are not dynamic, they are evaluated at compile time so no
variables are available.