From 8bdd0bb82f932e43cfbd89e41569c68c726a7078 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Mon, 11 Jan 2021 10:49:11 -0500 Subject: [PATCH] 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 --- README.md | 2 +- ansible_version.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 225a49229..e3aaf0e71 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Note: The list of validated [docker versions](https://kubernetes.io/docs/setup/p ## Requirements - **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 are configured to allow **IPv4 forwarding**. - The **firewalls are not managed**, you'll need to implement your own rules the way you used to. diff --git a/ansible_version.yml b/ansible_version.yml index 982880e2f..b4631223a 100644 --- a/ansible_version.yml +++ b/ansible_version.yml @@ -3,13 +3,15 @@ gather_facts: false become: no vars: - minimal_ansible_version: 2.8.0 + minimal_ansible_version: 2.9.0 + maximal_ansible_version: 2.10.0 ansible_connection: local tasks: - - name: "Check ansible version >={{ minimal_ansible_version }}" + - name: "Check {{ minimal_ansible_version }} <= Ansible version < {{ maximal_ansible_version }}" assert: - msg: "Ansible must be {{ minimal_ansible_version }} or higher" + msg: "Ansible must be between {{ minimal_ansible_version }} and {{ maximal_ansible_version }}" that: - ansible_version.string is version(minimal_ansible_version, ">=") + - ansible_version.string is version(maximal_ansible_version, "<") tags: - check