Require 2.9.0 <= Ansible version < 2.10.0 (#7130)

We have multiple breakage report with Ansible 2.10+ in https://github.com/kubernetes-sigs/kubespray/issues/6762
README.md already recommended 2.9+

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
This commit is contained in:
Etienne Champetier 2021-01-11 10:49:11 -05:00 committed by GitHub
parent a790935d02
commit 8bdd0bb82f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -145,7 +145,7 @@ Note: The list of validated [docker versions](https://kubernetes.io/docs/setup/p
## Requirements ## Requirements
- **Minimum required version of Kubernetes is v1.17** - **Minimum required version of Kubernetes is v1.17**
- **Ansible v2.9+, Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands** - **Ansible v2.9.x, Jinja 2.11+ and python-netaddr is installed on the machine that will run Ansible commands, Ansible 2.10.x is not supported for now**
- The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required (See [Offline Environment](docs/offline-environment.md)) - The target servers must have **access to the Internet** in order to pull docker images. Otherwise, additional configuration is required (See [Offline Environment](docs/offline-environment.md))
- The target servers are configured to allow **IPv4 forwarding**. - The target servers are configured to allow **IPv4 forwarding**.
- The **firewalls are not managed**, you'll need to implement your own rules the way you used to. - The **firewalls are not managed**, you'll need to implement your own rules the way you used to.

View file

@ -3,13 +3,15 @@
gather_facts: false gather_facts: false
become: no become: no
vars: vars:
minimal_ansible_version: 2.8.0 minimal_ansible_version: 2.9.0
maximal_ansible_version: 2.10.0
ansible_connection: local ansible_connection: local
tasks: tasks:
- name: "Check ansible version >={{ minimal_ansible_version }}" - name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}"
assert: assert:
msg: "Ansible must be {{ minimal_ansible_version }} or higher" msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}"
that: that:
- ansible_version.string is version(minimal_ansible_version, ">=") - ansible_version.string is version(minimal_ansible_version, ">=")
- ansible_version.string is version(maximal_ansible_version, "<")
tags: tags:
- check - check