diff --git a/roles/network_plugin/calico/tasks/main.yml b/roles/network_plugin/calico/tasks/main.yml index abe0f690d..75cf2d4a2 100644 --- a/roles/network_plugin/calico/tasks/main.yml +++ b/roles/network_plugin/calico/tasks/main.yml @@ -22,6 +22,17 @@ changed_when: false notify: restart calico-node +- name: Calico | 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: Calico | Install calico cni bin command: rsync -piu "{{ local_release_dir }}/calico/bin/calico" "/opt/cni/bin/calico" changed_when: false