Fix ansible syntax to avoid ansible deprecation warnings (#3512)

* failed

* version_compare

* succeeded

* skipped

* success

* version_compare becomes version since ansible 2.5

* ansible minimal version updated in doc and spec

* last version_compare
This commit is contained in:
Erwan Miran
2018-10-17 00:33:30 +02:00
committed by k8s-ci-robot
parent bfd4ccbeaa
commit 7bec169d58
75 changed files with 153 additions and 153 deletions

View File

@@ -2,7 +2,7 @@
- name: Stop if ansible version is too low
assert:
that:
- ansible_version.full|version_compare('2.3.0', '>=')
- ansible_version.full is version('2.3.0', '>=')
run_once: yes
- name: Stop if either kube-master, kube-node or etcd is empty
@@ -114,7 +114,7 @@
- name: Stop if kernel version is too low
assert:
that: ansible_kernel.split('-')[0]|version_compare('4.8', '>=')
that: ansible_kernel.split('-')[0] is version('4.8', '>=')
when: kube_network_plugin == 'cilium'
ignore_errors: "{{ ignore_assert_errors }}"
@@ -146,7 +146,7 @@
- name: "Check that calico version is enought for upgrade"
assert:
that:
- calico_version_on_server.stdout|version_compare('v2.6.5', '>=')
- calico_version_on_server.stdout is version('v2.6.5', '>=')
msg: "Your version of calico is not fresh enough for upgrade. Minimum version v2.6.5"
when:
- 'calico_version_on_server.stdout is defined'