-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tags are ignored at role level #13795
Comments
when roles are skipped it does not produce a 'no hosts matched' message, that is probably related to your |
@theraser this doesn't appear to be related to tags at all, based on the output above (and my testing shows this works fine with tags). Rather, this appears to be a result of your Could you please share the inventory your using in this example, or some other inventory which reproduces the behavior? |
Thanks four your fast reply :-) This indeed looks strange. When using Ansible 1.94 with exact same invocation role1, role2 [...] are executed just as expected. When Ansible development version is used I get this "skipping: no hosts matched" as you can see at top. However I think I found the issue at my tags (syntax):
That's why it skipped every role... Sometimes it's that easy, sorry for wasting your time |
Hrm, that's odd, that should be split up correctly. |
I am not sure if the fact that it worked with the old version was a bug or a feature. I just rewrote my playbooks and this works now. If you need any further information please let me know, then I would try to post a complete setup |
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will also be included in the next major release. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
Issue Type: Bug Report
Ansible Version:
ansible-playbook 2.1.0 (devel c3dd0213ef) last updated 2016/01/11 12:26:53 (GMT +200) lib/ansible/modules/core: (detached HEAD 33014c6db1) last updated 2016/01/08 15:07:37 (GMT +200) lib/ansible/modules/extras: (detached HEAD 82a4cf84be) last updated 2016/01/08 15:07:37 (GMT +200)
Environment: Ubuntu 15.04
Problem: Using tags defined for specific roles inside a playbook are ignored when running ansible-playbook with that tag, please see example for more details. Using version 1.94 this works perfectly. When tags are specified for some tasks inside this role they are usable just as expected with "--tags tag1".
Example:
Running
ansible-playbook -i ~/.ansible/hosts ~/.ansible/site.yml -l somehost --tags tag1
results in skipping everything:The text was updated successfully, but these errors were encountered: