diff options
author | Sylvain Baubeau <sbaubeau@redhat.com> | 2015-10-13 16:36:01 +0200 |
---|---|---|
committer | Sylvain Baubeau <sbaubeau@redhat.com> | 2015-10-27 17:42:56 +0100 |
commit | 2a7131b9403a4b22ebc55606814f604f723dc826 (patch) | |
tree | 0930790b4718d3bcfb96da8fb7cc65072e280f64 /roles/flannel/tasks | |
parent | f450c935f69366a15e078ec11b82bfa0c7130f6d (diff) | |
download | openshift-2a7131b9403a4b22ebc55606814f604f723dc826.tar.gz openshift-2a7131b9403a4b22ebc55606814f604f723dc826.tar.bz2 openshift-2a7131b9403a4b22ebc55606814f604f723dc826.tar.xz openshift-2a7131b9403a4b22ebc55606814f604f723dc826.zip |
Add flannel support
Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
Diffstat (limited to 'roles/flannel/tasks')
-rw-r--r-- | roles/flannel/tasks/main.yml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/roles/flannel/tasks/main.yml b/roles/flannel/tasks/main.yml new file mode 100644 index 000000000..8a871efb2 --- /dev/null +++ b/roles/flannel/tasks/main.yml @@ -0,0 +1,44 @@ +--- +- name: Install flannel + sudo: true + yum: pkg=flannel state=present + +- name: Set flannel etcd url + sudo: true + lineinfile: + dest: /etc/sysconfig/flanneld + backrefs: yes + regexp: "^(FLANNEL_ETCD=)" + line: '\1{{ etcd_hosts|join(",") }}' + +- name: Set flannel etcd key + sudo: true + lineinfile: + dest: /etc/sysconfig/flanneld + backrefs: yes + regexp: "^(FLANNEL_ETCD_KEY=)" + line: '\1{{ flannel_etcd_key }}' + notify: + +- name: Set flannel options + sudo: true + lineinfile: + dest: /etc/sysconfig/flanneld + backrefs: yes + regexp: "^#?(FLANNEL_OPTIONS=)" + line: '\1--iface {{ flannel_interface }} --etcd-cafile={{ etcd_peer_ca_file }} --etcd-keyfile={{ etcd_peer_key_file }} --etcd-certfile={{ etcd_peer_cert_file }}' + +- name: Enable flanneld + sudo: true + service: + name: flanneld + state: started + enabled: yes + register: start_result + +- name: Remove docker bridge ip + sudo: true + shell: ip a del `ip a show docker0 | grep inet | awk '{print $2}'` dev docker0 + notify: + - restart docker + - restart node |