summaryrefslogtreecommitdiffstats
path: root/roles/flannel
diff options
context:
space:
mode:
Diffstat (limited to 'roles/flannel')
-rw-r--r--roles/flannel/tasks/main.yml23
1 files changed, 10 insertions, 13 deletions
diff --git a/roles/flannel/tasks/main.yml b/roles/flannel/tasks/main.yml
index 6b6dfb423..a51455bae 100644
--- a/roles/flannel/tasks/main.yml
+++ b/roles/flannel/tasks/main.yml
@@ -1,24 +1,21 @@
---
- name: Install flannel
become: yes
- action: "{{ ansible_pkg_mgr }} name=flannel state=present"
- when: not openshift.common.is_containerized | bool
+ package: name=flannel state=present
+ when: not openshift.common.is_atomic | bool
-- name: Set flannel etcd url
+- name: Set flannel etcd options
become: yes
lineinfile:
dest: /etc/sysconfig/flanneld
backrefs: yes
- regexp: "^(FLANNEL_ETCD=)"
- line: '\1{{ etcd_hosts|join(",") }}'
-
-- name: Set flannel etcd key
- become: yes
- lineinfile:
- dest: /etc/sysconfig/flanneld
- backrefs: yes
- regexp: "^(FLANNEL_ETCD_KEY=)"
- line: '\1{{ flannel_etcd_key }}'
+ regexp: "{{ item.regexp }}"
+ line: "{{ item.line }}"
+ with_items:
+ - { regexp: "^(FLANNEL_ETCD=)", line: '\1{{ etcd_hosts|join(",") }}' }
+ - { regexp: "^(FLANNEL_ETCD_ENDPOINTS=)", line: '\1{{ etcd_hosts|join(",") }}' }
+ - { regexp: "^(FLANNEL_ETCD_KEY=)", line: '\1{{ flannel_etcd_key }}' }
+ - { regexp: "^(FLANNEL_ETCD_PREFIX=)", line: '\1{{ flannel_etcd_key }}' }
- name: Set flannel options
become: yes