Merge pull request #521 from anthonyhaussman/MethodBoolUseCNI
Change method to set use_hyperkube_cni var boolpull/522/head
commit
948d1d61ff
|
@ -22,16 +22,15 @@
|
|||
changed_when: false
|
||||
notify: restart calico-node
|
||||
|
||||
- name: Calico | Determine hyperkube cni to use depending of the version of kube
|
||||
- name: Calico | Do not use hyperkube cni if kube_version under v1.3.4
|
||||
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 -%}
|
||||
use_hyperkube_cni: false
|
||||
when: kube_version | version_compare('v1.3.4','<')
|
||||
|
||||
- name: Calico | Use hyperkube cni if kube_version above v1.3.4
|
||||
set_fact:
|
||||
use_hyperkube_cni: true
|
||||
when: kube_version | version_compare('v1.3.4','>=')
|
||||
|
||||
- name: Calico | Install calico cni bin
|
||||
command: rsync -piu "{{ local_release_dir }}/calico/bin/calico" "/opt/cni/bin/calico"
|
||||
|
|
Loading…
Reference in New Issue