summaryrefslogtreecommitdiffstats
path: root/roles/ansible/tasks
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-05-18 15:05:04 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-05-18 15:05:04 -0400
commit8ba0149d5eb990901f929437a5ee3b8ca8089bff (patch)
treeccb176bd0f9fac04dba76fabcaefd04edc870d62 /roles/ansible/tasks
parent09b5c45e90fbb321b7cf92c7a431b7aa4d4a803c (diff)
downloadopenshift-8ba0149d5eb990901f929437a5ee3b8ca8089bff.tar.gz
openshift-8ba0149d5eb990901f929437a5ee3b8ca8089bff.tar.bz2
openshift-8ba0149d5eb990901f929437a5ee3b8ca8089bff.tar.xz
openshift-8ba0149d5eb990901f929437a5ee3b8ca8089bff.zip
Updating ansible config through a separate config.yml
Diffstat (limited to 'roles/ansible/tasks')
-rw-r--r--roles/ansible/tasks/config.yml8
-rw-r--r--roles/ansible/tasks/main.yml (renamed from roles/ansible/tasks/main.yaml)4
2 files changed, 12 insertions, 0 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 }}"