summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.tito/packages/openshift-ansible2
-rwxr-xr-xinventory/multi_ec2.py31
-rw-r--r--openshift-ansible.spec16
-rw-r--r--roles/openshift_ansible_inventory/tasks/main.yml7
-rw-r--r--roles/openshift_ansible_inventory/templates/multi_ec2.yaml.j226
5 files changed, 36 insertions, 46 deletions
diff --git a/.tito/packages/openshift-ansible b/.tito/packages/openshift-ansible
index a5750f1ac..1a77715d2 100644
--- a/.tito/packages/openshift-ansible
+++ b/.tito/packages/openshift-ansible
@@ -1 +1 @@
-3.0.4-1 ./
+3.0.5-1 ./
diff --git a/inventory/multi_ec2.py b/inventory/multi_ec2.py
index 23cf5ecf1..98dde3f3c 100755
--- a/inventory/multi_ec2.py
+++ b/inventory/multi_ec2.py
@@ -241,23 +241,24 @@ class MultiEc2(object):
'''
results = self.all_ec2_results[acc_config['name']]
- # Update each hostvar with the newly desired key: value
- for new_var, value in acc_config.get('extra_vars', {}).items():
- # Verify the account results look sane
- # by checking for these keys ('_meta' and 'hostvars' exist)
- if results.has_key('_meta') and results['_meta'].has_key('hostvars'):
- for data in results['_meta']['hostvars'].values():
- data[str(new_var)] = str(value)
-
- # Add this group
- if results.has_key(acc_config['all_group']):
- results["%s_%s" % (new_var, value)] = \
- copy.copy(results[acc_config['all_group']])
+ # Update each hostvar with the newly desired key: value from extra_*
+ for _extra in ['extra_groups', 'extra_vars']:
+ for new_var, value in acc_config.get(_extra, {}).items():
+ # Verify the account results look sane
+ # by checking for these keys ('_meta' and 'hostvars' exist)
+ if results.has_key('_meta') and results['_meta'].has_key('hostvars'):
+ for data in results['_meta']['hostvars'].values():
+ data[str(new_var)] = str(value)
+
+ # Add this group
+ if _extra == 'extra_groups' and results.has_key(acc_config['all_group']):
+ results["%s_%s" % (new_var, value)] = \
+ copy.copy(results[acc_config['all_group']])
# Clone groups goes here
- for name_from, name_to in acc_config.get('clone_groups', {}).items():
- if results.has_key(name_from):
- results[name_to] = copy.copy(results[name_from])
+ for to_name, from_name in acc_config.get('clone_groups', {}).items():
+ if results.has_key(from_name):
+ results[to_name] = copy.copy(results[from_name])
# Clone vars goes here
for to_name, from_name in acc_config.get('clone_vars', {}).items():
diff --git a/openshift-ansible.spec b/openshift-ansible.spec
index a5f25d966..a9e0fbde6 100644
--- a/openshift-ansible.spec
+++ b/openshift-ansible.spec
@@ -5,7 +5,7 @@
}
Name: openshift-ansible
-Version: 3.0.4
+Version: 3.0.5
Release: 1%{?dist}
Summary: Openshift and Atomic Enterprise Ansible
License: ASL 2.0
@@ -225,6 +225,20 @@ Atomic OpenShift Utilities includes
%changelog
+* Thu Oct 29 2015 Kenny Woodson <kwoodson@redhat.com> 3.0.5-1
+- Updating multi_ec2 to support extra_vars and extra_groups
+ (kwoodson@redhat.com)
+- Removing the template and doing to_nice_yaml instead (kwoodson@redhat.com)
+- README_AEP.md: update instructions for creating router and registry
+ (jlebon@redhat.com)
+- README_AEP: Various fixes (walters@verbum.org)
+- Fixing for extra_vars rename. (kwoodson@redhat.com)
+- make storage_plugin_deps conditional on deployment_type (jdetiber@redhat.com)
+- remove debugging pauses (jdetiber@redhat.com)
+- make storage plugin dependency installation more flexible
+ (jdetiber@redhat.com)
+- Install storage plugin dependencies (jdetiber@redhat.com)
+
* Wed Oct 28 2015 Kenny Woodson <kwoodson@redhat.com> 3.0.4-1
- Removing spec files. (kwoodson@redhat.com)
- Updated example (kwoodson@redhat.com)
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 %}