Re:ShutIt – Automation framework for programmers
by Azeralthefallen on Sunday July 10, 2016 @04:07PM
(#12067059)
Unfortunately the above way will load the vars at a higher precedence then group_vars. Also if you have multiple groups with the same var but differing values you will need to start loading multiple files (or you can do |default, and use an alias to the value in group_vars (which leads to even more spaghetti)).
For sharing common group_vars, what I do is my inventory passes an environment-aware variable which I include in the playbook by doing like:
`- include: "env_vars/{{ environment }}/main.yml"`
I feel I sidestepped some of the AWS modules issues simply by using Terraform. I still build all my images in Packer using the Ansible builder though.