Hello. I have an interesting scenario that I have been pondering and would
like some input from the community. I would like to apply group_vars to
series of servers, that are defined by application *roles *and also defined
by the *environments* production and pre-producution, So the filter order
should be: *role* --> *environment*
I am using dynamic inventory, in specific, AWS.
The following tags are used:
- tag_environment_prod
- tag_environment_preprod
- tag_role_app1
- tag_role_app2
EC2 instances would be tagged the following way:
preprod-app1: tag_environment_preprod, tag_role_app1
preprod-app2: tag_environment_preprod, tag_role_app2
prod-app1 :tag_environment_prod, tag_role_app1
Etc....
Regardless of the *role* assigned to that server, it shares a common
configuration file:
#app.conf
APP_KEY={{ app_key }}
APP_THING1={{ app_thing1 }}
APP_THING2={{ app_thing2 }}
My goal is to first filter groups based upon role, then based upon
environment. Maybe something like:
/group_vars
/app1_prod
/app1_preprod
/app2_prod
/app2_preprod
Using a dynamic inventory, how can I accomplish this filter using more than
one EC2 tag?
Thanks!
Brian
--
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/0143b4c6-cc75-4b5f-a35c-c0f145dfe748%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.