Skip to content
Snippets Groups Projects
Commit 5046466d authored by Smaine Kahlouch's avatar Smaine Kahlouch Committed by GitHub
Browse files

Merge pull request #509 from kubespray/cnicopyweave

Copy hyperkube CNI plugins when using weave
parents 0cc581b2 a3fe1e78
Branches
Tags
No related merge requests found
...@@ -9,6 +9,26 @@ ...@@ -9,6 +9,26 @@
notify: notify:
- restart docker - restart docker
- name: Weave | Determine hyperkube cni to use depending of the version of kube
set_fact:
use_hyperkube_cni: >
{%- if kube_version | version_compare('v1.3.4','>=') -%}
true
{%- elif kube_version | version_compare('v1.3.4','<') -%}
false
{%- else -%}
{{ ErrorCannotRecognizeVersion }}
{%- endif -%}
- name: Weave | Copy cni plugins from hyperkube
command: "/usr/bin/docker run --rm -v /opt/cni/bin:/cnibindir {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }} /bin/cp -r /opt/cni/bin/. /cnibindir/"
register: cni_task_result
until: cni_task_result.rc == 0
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
changed_when: false
when: "{{ use_hyperkube_cni|bool }}"
- name: Weave | Install weave - name: Weave | Install weave
command: rsync -piu "{{ local_release_dir }}/weave/bin/weave" "{{ bin_dir }}/weave" command: rsync -piu "{{ local_release_dir }}/weave/bin/weave" "{{ bin_dir }}/weave"
changed_when: false changed_when: false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment