Raw tag/value pairs as group names

RE: https://github.com/ansible/ansible/pull/5430

The intent here was to make it possible for users of the ec2 inventory module to be able to directly address hosts using groups in the format of ‘=’

The patch does not change existing behavior, and keeps the legacy format of host groups for tags to look like ‘tag__’ by default.

Say I have a tag named ‘role’ across some subset of instances, and the value of this tag can be set to things like ‘builder’, ‘packer’ or ‘shipper’.

Using the ec2 inventory plugin as is, to run a playbook across all host instances whose ‘role’ tag is set to ‘builder’, one would need to:

ansible-playbook -i ./inventory ./playbooks/builders.yml -l tag_role_builder

It would be nice to simply be able to do:

ansible-playbook -i ./inventory ./playbooks/builders.yml -l role=builder

And now you can also define your playbooks to have:

I was suggesting this be posed on ansible-devel list btw, will let you post there and we can discuss.

– Michael

Ah, apologies. Will move discussion over.