Browse Source

Added ability to create groupby options on hostvars

Kenny Woodson 10 years ago
parent
commit
d9c0bfdbbe
1 changed files with 7 additions and 0 deletions
  1. 7 0
      roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2

+ 7 - 0
roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2

@@ -15,5 +15,12 @@ accounts:
     env_vars:
     env_vars:
       AWS_ACCESS_KEY_ID: {{ account.env_vars.AWS_ACCESS_KEY_ID }}
       AWS_ACCESS_KEY_ID: {{ account.env_vars.AWS_ACCESS_KEY_ID }}
       AWS_SECRET_ACCESS_KEY: {{ account.env_vars.AWS_SECRET_ACCESS_KEY }}
       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 %}
 {% endfor %}