summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-05-18 16:22:00 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-05-18 16:22:00 -0400
commit0ca0145d960a17619c426fde17a50237947d90ab (patch)
treeccb176bd0f9fac04dba76fabcaefd04edc870d62 /roles
parent09b5c45e90fbb321b7cf92c7a431b7aa4d4a803c (diff)
parent8ba0149d5eb990901f929437a5ee3b8ca8089bff (diff)
downloadopenshift-0ca0145d960a17619c426fde17a50237947d90ab.tar.gz
openshift-0ca0145d960a17619c426fde17a50237947d90ab.tar.bz2
openshift-0ca0145d960a17619c426fde17a50237947d90ab.tar.xz
openshift-0ca0145d960a17619c426fde17a50237947d90ab.zip
Merge pull request #230 from kwoodson/nocows
Disabling cows and refactor of config options to ansible.cfg.
Diffstat (limited to 'roles')
-rw-r--r--roles/ansible/tasks/config.yml8
-rw-r--r--roles/ansible/tasks/main.yml (renamed from roles/ansible/tasks/main.yaml)4
-rw-r--r--roles/openshift_ansible_inventory/tasks/main.yml7
3 files changed, 12 insertions, 7 deletions
diff --git a/roles/ansible/tasks/config.yml b/roles/ansible/tasks/config.yml
new file mode 100644
index 000000000..5e361429b
--- /dev/null
+++ b/roles/ansible/tasks/config.yml
@@ -0,0 +1,8 @@
+---
+- name: modify ansible.cfg
+ lineinfile:
+ dest: /etc/ansible/ansible.cfg
+ backrefs: yes
+ regexp: "^#?({{ item.option }})( *)="
+ line: '\1\2= {{ item.value }}'
+ with_items: cfg_options
diff --git a/roles/ansible/tasks/main.yaml b/roles/ansible/tasks/main.yml
index 67a04b919..5d20a3b35 100644
--- a/roles/ansible/tasks/main.yaml
+++ b/roles/ansible/tasks/main.yml
@@ -5,3 +5,7 @@
yum:
pkg: ansible
state: installed
+
+- include: config.yml
+ vars:
+ cfg_options: "{{ ans_config }}"
diff --git a/roles/openshift_ansible_inventory/tasks/main.yml b/roles/openshift_ansible_inventory/tasks/main.yml
index 91c96d827..5e517cb46 100644
--- a/roles/openshift_ansible_inventory/tasks/main.yml
+++ b/roles/openshift_ansible_inventory/tasks/main.yml
@@ -32,12 +32,6 @@
job: '/usr/share/ansible/inventory/multi_ec2.py --refresh-cache &> /dev/null'
when: oo_cron_refresh_cache is defined and oo_cron_refresh_cache
-- lineinfile:
- dest: /etc/ansible/ansible.cfg
- backrefs: yes
- regexp: '^(hostfile|inventory)( *)='
- line: '\1\2= /etc/ansible/inventory'
-
- name: setting ec2.ini destination_format
lineinfile:
dest: /usr/share/ansible/inventory/aws/ec2.ini
@@ -61,4 +55,3 @@
recurse: yes
mode: '2750'
when: oo_inventory_cache_location is defined
-