Skip to content
Snippets Groups Projects
Commit 550bda95 authored by Anthony Haussmann's avatar Anthony Haussmann
Browse files

Change method to set use_hyperkube_cni var bool

The precedent method returb a string "True\n" or "False\n", it seems to be an Ansible bug.
New method return a boolean
parent 6b27508c
No related branches found
No related tags found
No related merge requests found
...@@ -22,16 +22,15 @@ ...@@ -22,16 +22,15 @@
changed_when: false changed_when: false
notify: restart calico-node 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: set_fact:
use_hyperkube_cni: > use_hyperkube_cni: false
{%- if kube_version | version_compare('v1.3.4','>=') -%} when: kube_version | version_compare('v1.3.4','<')
true
{%- elif kube_version | version_compare('v1.3.4','<') -%} - name: Calico | Use hyperkube cni if kube_version above v1.3.4
false set_fact:
{%- else -%} use_hyperkube_cni: true
{{ ErrorCannotRecognizeVersion }} when: kube_version | version_compare('v1.3.4','>=')
{%- endif -%}
- name: Calico | Install calico cni bin - name: Calico | Install calico cni bin
command: rsync -piu "{{ local_release_dir }}/calico/bin/calico" "/opt/cni/bin/calico" command: rsync -piu "{{ local_release_dir }}/calico/bin/calico" "/opt/cni/bin/calico"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment