diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2015-11-06 16:37:05 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2015-11-06 16:37:05 -0500 |
commit | 0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08 (patch) | |
tree | 65621b66033088d69cfa155e7319f780bd550ea8 /roles/flannel/tasks/main.yml | |
parent | 21caa21c84b8f5a8bec415107bb7a6b6a2082790 (diff) | |
parent | e7b200a24816daf05da374ccfce3a4d5db66e291 (diff) | |
download | openshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.tar.gz openshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.tar.bz2 openshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.tar.xz openshift-0fe63e0ed8af3aec27ef4aa7eeaa5866f6ebce08.zip |
Merge pull request #698 from lebauce/flannel
Add support for flannel
Diffstat (limited to 'roles/flannel/tasks/main.yml')
-rw-r--r-- | roles/flannel/tasks/main.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/roles/flannel/tasks/main.yml b/roles/flannel/tasks/main.yml new file mode 100644 index 000000000..acfb009ec --- /dev/null +++ b/roles/flannel/tasks/main.yml @@ -0,0 +1,43 @@ +--- +- 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 }}' + +- 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[[:space:]]" | awk '{print $2}'` dev docker0 + notify: + - restart docker + - restart node |