From d9c0bfdbbebc8ca508ddc3f7cee4a41af666f464 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 14 May 2015 13:49:27 -0400 Subject: Added ability to create groupby options on hostvars --- roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2') diff --git a/roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2 b/roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2 index 6e794c194..8228ab915 100644 --- a/roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2 +++ b/roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2 @@ -15,5 +15,12 @@ accounts: env_vars: AWS_ACCESS_KEY_ID: {{ account.env_vars.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: {{ account.env_vars.AWS_SECRET_ACCESS_KEY }} +{% if account.all_group is defined and account.hostvars is defined%} + all_group: {{ account.all_group }} + hostvars: +{% for property, value in account.hostvars.items() %} + {{ property }}: {{ value }} +{% endfor %} +{% endif %} {% endfor %} -- cgit v1.2.3