This is probably very terrible, but... pre_tasks: - name: set tag as fact set_fact: myvar = mytag tags: mytag
I don't think there is an 'ansible_tags' var passed to the playbook. I haven't looked, but It is possible that an action_plugin might have access to that (from __main__ import cli), so you can create a module that sets 'ansible_tags' as an ansible fact. -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c7872488-4b3c-42e7-9004-d8532ddb1616%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.