I found the solution here: http://docs.ansible.com/ansible/playbooks_tags.html
The syntax in this case that works for me is: - include: something.yml tags: something On Monday, May 2, 2016 at 2:15:14 PM UTC-4, Jacob wrote: > > Hello, > > I'm writing a new playbook and executing it using ansible 2.1.0. It > appears the tags I define in main.yml on an include line are being ignored. > By comparison, this works as expected in ansible 1.9.2 > > Example: > > roles/common/tasks/main.yml: > > --- > > - include: something.yml tags=something > > I would then expect to be able to run something like *ansible-playbook -i > hosts something.yml -t something* to run just the something task or > *ansible-playbook > -i hosts something.yml -t something --list-tasks* and have the something > tasks printed but it is not. > > Does it no longer work this way in ansible 2? Any suggestions on how I can > make this work? Essentially, I'm looking to tag ALL tasks in the > something.yml play, in this example. > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/748cac7b-39b0-484a-b982-db0cc3f3b482%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
