summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-05-14 14:14:49 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-05-14 14:14:49 -0400
commitff96174e119f0b176580249ec2d022b46b63e074 (patch)
treeab6915a64fdec6b52727c86790dd619da5654f41
parent5204ba97de0bb3872defa391f9991f52622b4b0a (diff)
parentd9c0bfdbbebc8ca508ddc3f7cee4a41af666f464 (diff)
downloadopenshift-ff96174e119f0b176580249ec2d022b46b63e074.tar.gz
openshift-ff96174e119f0b176580249ec2d022b46b63e074.tar.bz2
openshift-ff96174e119f0b176580249ec2d022b46b63e074.tar.xz
openshift-ff96174e119f0b176580249ec2d022b46b63e074.zip
Merge pull request #226 from kwoodson/hostvars
Added ability to group by hostvars specified in yaml.
-rw-r--r--roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j27
1 files changed, 7 insertions, 0 deletions
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 %}