ansible/ansible — pull request #4004 by herbyg-axial (2013-09-03 02:10:44+00:00)
Title: ec2 inventory plugin: Make it possible to group instances based off the expansion of the comma-seperated values of specified instance tags

In AWS, instance tags are unique and you cannot have multiple tags with the same name.

But there are situations where you'd like multiple values for a particular tag name, and as such, you'd end up setting the value to be a comma-seperated string.

This change adds the ability group instances based off the expansion of a comma-seperated list from specified tags.

For example, if you had a tag set like this on an instance:
roles = "www, db, frontend"

...and you specified the tag name 'roles' in the 'expanded_tag_names' setting, then the after this change, the ec2 inventory script would create 3 additional tag groups:

tag_roles_www
tag_roles_db
tag_roles_frontend