summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-10-29 15:07:03 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-10-29 15:07:03 -0400
commit5758fdc75659bdd9a02cc56efb7255d677233ad2 (patch)
tree67587555bd1d45695424ceb3966e9976776dbf84 /roles
parent9bbaa824da5e1a049cdec1a6523c3841d713386c (diff)
parent947de774fdc0022caf0e3083dca4e085984272d5 (diff)
downloadopenshift-5758fdc75659bdd9a02cc56efb7255d677233ad2.tar.gz
openshift-5758fdc75659bdd9a02cc56efb7255d677233ad2.tar.bz2
openshift-5758fdc75659bdd9a02cc56efb7255d677233ad2.tar.xz
openshift-5758fdc75659bdd9a02cc56efb7255d677233ad2.zip
Merge pull request #769 from openshift/master
Master to prod
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_ansible_inventory/tasks/main.yml7
-rw-r--r--roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j226
2 files changed, 4 insertions, 29 deletions
diff --git a/roles/openshift_ansible_inventory/tasks/main.yml b/roles/openshift_ansible_inventory/tasks/main.yml
index 5fe77e38b..9cc15c0a8 100644
--- a/roles/openshift_ansible_inventory/tasks/main.yml
+++ b/roles/openshift_ansible_inventory/tasks/main.yml
@@ -3,8 +3,9 @@
name: openshift-ansible-inventory
state: present
-- template:
- src: multi_ec2.yaml.j2
+- name:
+ copy:
+ content: "{{ oo_inventory_accounts | to_nice_yaml }}"
dest: /etc/ansible/multi_ec2.yaml
group: "{{ oo_inventory_group }}"
owner: "{{ oo_inventory_owner }}"
@@ -39,5 +40,5 @@
owner: root
group: libra_ops
recurse: yes
- mode: '2750'
+ mode: '2770'
when: oo_inventory_cache_location is defined
diff --git a/roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2 b/roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2
deleted file mode 100644
index ce8515e17..000000000
--- a/roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j2
+++ /dev/null
@@ -1,26 +0,0 @@
-# multi ec2 inventory configs
-cache_max_age: {{ oo_inventory_cache_max_age }}
-cache_location: {{ oo_inventory_cache_location | default('~/.ansible/tmp/multi_ec2_inventory.cache') }}
-accounts:
-{% for account in oo_inventory_accounts %}
- - name: {{ account.name }}
- provider: {{ account.provider }}
- provider_config:
-{% for section, items in account.provider_config.items() %}
- {{ section }}:
-{% for property, value in items.items() %}
- {{ property }}: {{ value }}
-{% endfor %}
-{% endfor %}
- 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.extra_vars is defined%}
- all_group: {{ account.all_group }}
- extra_vars:
-{% for property, value in account.extra_vars.items() %}
- {{ property }}: {{ value }}
-{% endfor %}
-{% endif %}
-
-{% endfor %}