From c5c6d995d3cd9261c61d32dd279d756faf463df6 Mon Sep 17 00:00:00 2001
From: Pierre Riteau <pierre@stackhpc.com>
Date: Wed, 23 Sep 2020 17:48:01 +0200
Subject: [PATCH] Bump minimum Ansible version to 2.9

Change-Id: I5befc72a4894d625ca352b27df9d3aa84a2f5b2c
---
 ansible/roles/prechecks/vars/main.yml                       | 2 +-
 doc/source/user/quickstart.rst                              | 2 +-
 lower-constraints.txt                                       | 2 +-
 releasenotes/notes/require-ansible-29-f03f4e22292a5bb4.yaml | 5 +++++
 test-requirements.txt                                       | 2 +-
 tests/run.yml                                               | 2 +-
 tools/kolla-ansible                                         | 2 +-
 7 files changed, 11 insertions(+), 6 deletions(-)
 create mode 100644 releasenotes/notes/require-ansible-29-f03f4e22292a5bb4.yaml

diff --git a/ansible/roles/prechecks/vars/main.yml b/ansible/roles/prechecks/vars/main.yml
index 558696e05b..4d5d65d0b9 100644
--- a/ansible/roles/prechecks/vars/main.yml
+++ b/ansible/roles/prechecks/vars/main.yml
@@ -1,7 +1,7 @@
 ---
 docker_version_min: '1.10.0'
 docker_py_version_min: '2.0.0'
-ansible_version_min: '2.8'
+ansible_version_min: '2.9'
 ansible_version_max: '2.9'
 
 # Top level keys should match ansible_distribution.
diff --git a/doc/source/user/quickstart.rst b/doc/source/user/quickstart.rst
index da1b5447d7..49427fd0a8 100644
--- a/doc/source/user/quickstart.rst
+++ b/doc/source/user/quickstart.rst
@@ -79,7 +79,7 @@ If not installing Kolla Ansible in a virtual environment, skip this section.
       pip install -U pip
 
 #. Install `Ansible <http://www.ansible.com>`__. Kolla Ansible requires at least
-   Ansible ``2.8`` and supports up to ``2.9``.
+   Ansible ``2.9`` and supports up to ``2.9``.
 
    .. code-block:: console
 
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 76872191c9..33616303ce 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -1,5 +1,5 @@
 alabaster==0.7.10
-ansible==2.8.0
+ansible==2.9.0
 appdirs==1.4.3
 asn1crypto==0.24.0
 Babel==2.5.3
diff --git a/releasenotes/notes/require-ansible-29-f03f4e22292a5bb4.yaml b/releasenotes/notes/require-ansible-29-f03f4e22292a5bb4.yaml
new file mode 100644
index 0000000000..a6e09d7df2
--- /dev/null
+++ b/releasenotes/notes/require-ansible-29-f03f4e22292a5bb4.yaml
@@ -0,0 +1,5 @@
+---
+upgrade:
+  - |
+    Kolla-Ansible now requires Ansible ``2.9``. Ansible ``2.8`` is not
+    supported anymore.
diff --git a/test-requirements.txt b/test-requirements.txt
index 28dcb69dda..f960fd505a 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -13,4 +13,4 @@ coverage!=4.4,>=4.0 # Apache-2.0
 docker>=2.4.2 # Apache-2.0
 oslotest>=3.2.0 # Apache-2.0
 stestr>=2.0.0 # Apache-2.0
-ansible>=2.8.0 # GPLv3
+ansible>=2.9.0 # GPLv3
diff --git a/tests/run.yml b/tests/run.yml
index f59701078e..032262a442 100644
--- a/tests/run.yml
+++ b/tests/run.yml
@@ -197,7 +197,7 @@
     - name: install kolla-ansible and dependencies
       vars:
         # Test latest ansible version on Ubuntu, minimum supported on others.
-        ansible_version_constraint: "{{ '==2.9.*,!=2.9.8,!=2.9.12' if base_distro == 'ubuntu' else '==2.8.*,!=2.8.14' }}"
+        ansible_version_constraint: "==2.9.*"
       pip:
         name:
           - "{{ kolla_ansible_src_dir }}"
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index 2d01cf62a6..9d8ba9e137 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -54,7 +54,7 @@ function check_environment_coherence {
         exit 1
     fi
 
-    local ANSIBLE_VERSION_MIN=2.8
+    local ANSIBLE_VERSION_MIN=2.9
     local ANSIBLE_VERSION_MAX=2.9
 
     if [[ $(printf "%s\n" "$ANSIBLE_VERSION_MIN" "$ANSIBLE_VERSION_MAX" "$ansible_version" | sort -V | head -n1) != "$ANSIBLE_VERSION_MIN" ]] ||
-- 
GitLab