I'm searching for a way to always run a role, regardless of --tags args.
Here is a simple playbook:
- hosts: all
roles:
- { role: role1, tags: always },
- { role: role2, tags: tag1 },
- { role: role3, tags: tag2 }
I would like only role1 and role2 to run when I launch the following filter (instead of only role2):
ansible-playbook -i hosts deploy.yml --tags tag1
I though it was the default behavior with the special always tag (see http://docs.ansible.com/ansible/playbooks_tags.html#special-tags)
I'm playing with Ansible 1.8.4.
Most probably your Ansible version is the problem.
The always tag was introduced with this pull request, which was merged into the devel branch on February 25. According to the releases, the next released version after that date was Ansible 1.9.0-1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With