aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2023-04-20 16:50:09 +0000
committerMark Goddard <mark@stackhpc.com>2023-05-18 20:04:48 +0100
commit10fc1b748aac8fe4157537531f6e34d111bb879c (patch)
tree3a9891eacde293c5fa4cca39edac01ff5c4d9bcc
parentddadaa282e72cc437470859766ac963ac757a26a (diff)
downloadkolla-ansible-10fc1b748aac8fe4157537531f6e34d111bb879c.tar.gz
kolla-ansible-10fc1b748aac8fe4157537531f6e34d111bb879c.zip
ansible: bump min to 2.13 and max to 2.14.2
We limit to 2.14.2 due to a regression in ansible-core [1] that breaks conditional include_task loops in handlers. This is used for controlled restarts of MariaDB and RabbitMQ. [1]: https://github.com/ansible/ansible/commit/65366f663de7d044f42ae6dd53368fd4c1f88b35 Change-Id: I57425680a4cdbf0daeb9b2cc35920f1b933aa4a8 Co-Authored-By: Michal Nasiadka <michal@stackhpc.com>
-rw-r--r--ansible/roles/prechecks/vars/main.yml4
-rw-r--r--doc/source/user/quickstart.rst6
-rw-r--r--doc/source/user/virtual-environments.rst3
-rw-r--r--releasenotes/notes/ansible-2.14-d83c5ce197321353.yaml6
-rw-r--r--tests/run.yml14
-rwxr-xr-xtools/kolla-ansible4
6 files changed, 26 insertions, 11 deletions
diff --git a/ansible/roles/prechecks/vars/main.yml b/ansible/roles/prechecks/vars/main.yml
index b55ff5bef..6e267f3e7 100644
--- a/ansible/roles/prechecks/vars/main.yml
+++ b/ansible/roles/prechecks/vars/main.yml
@@ -1,8 +1,8 @@
---
docker_version_min: '18.09'
docker_py_version_min: '3.4.1'
-ansible_version_min: '2.12'
-ansible_version_max: '2.13'
+ansible_version_min: '2.13'
+ansible_version_max: '2.14.2'
# Top level keys should match ansible_facts.distribution.
# These map to lists of supported releases (ansible_facts.distribution_release) or
diff --git a/doc/source/user/quickstart.rst b/doc/source/user/quickstart.rst
index 1254d5762..2cc9e2426 100644
--- a/doc/source/user/quickstart.rst
+++ b/doc/source/user/quickstart.rst
@@ -90,11 +90,13 @@ Install dependencies for the virtual environment
pip install -U pip
#. Install `Ansible <http://www.ansible.com>`__. Kolla Ansible requires at least
- Ansible ``4`` and supports up to ``5``.
+ Ansible ``6`` and supports up to ``7``. Ansible-core must not be greater
+ than 2.14.2 due to a regression.
.. code-block:: console
- pip install 'ansible>=4,<6'
+ pip install 'ansible-core>=2.13,<=2.14.2'
+ pip install 'ansible>=6,<8'
Install Kolla-ansible
diff --git a/doc/source/user/virtual-environments.rst b/doc/source/user/virtual-environments.rst
index 5bf780eec..9324429a6 100644
--- a/doc/source/user/virtual-environments.rst
+++ b/doc/source/user/virtual-environments.rst
@@ -26,7 +26,8 @@ python virtual environment on the Ansible control host. For example:
source /path/to/venv/bin/activate
pip install -U pip
pip install kolla-ansible
- pip install 'ansible>=4,<6'
+ pip install 'ansible-core>=2.13,<=2.14.2'
+ pip install 'ansible>=6,<8'
deactivate
To use the virtual environment, it should first be activated:
diff --git a/releasenotes/notes/ansible-2.14-d83c5ce197321353.yaml b/releasenotes/notes/ansible-2.14-d83c5ce197321353.yaml
new file mode 100644
index 000000000..15a4646aa
--- /dev/null
+++ b/releasenotes/notes/ansible-2.14-d83c5ce197321353.yaml
@@ -0,0 +1,6 @@
+---
+upgrade:
+ - |
+ Minimum supported Ansible version is now ``6`` (ansible-core 2.13)
+ and maximum supported is ``7`` (ansible-core 2.14). Due to a regression in
+ ``ansible-core``, it must not be greater than ``2.14.2``.
diff --git a/tests/run.yml b/tests/run.yml
index b89b8a261..c744a1c06 100644
--- a/tests/run.yml
+++ b/tests/run.yml
@@ -231,20 +231,25 @@
- name: Ensure the latest tested pip
pip:
- name: "pip==22.*"
+ name: "pip==23.*"
state: latest
virtualenv: "{{ kolla_ansible_venv_path }}"
- name: Ensure the latest tested setuptools
pip:
- name: "setuptools==65.*"
+ name: "setuptools==67.2.0"
state: latest
virtualenv: "{{ kolla_ansible_venv_path }}"
- name: install kolla-ansible and dependencies
vars:
- ansible_version_min: "==5.*"
- ansible_version_max: "==6.*"
+ ansible_core_version_min: "==2.13.*"
+ ansible_core_version_max: "==2.14.2"
+ # Test latest ansible version on Ubuntu, minimum supported on others.
+ ansible_core_version_constraint: >-
+ {{ ansible_core_version_min if is_upgrade or base_distro != 'ubuntu' else ansible_core_version_max }}
+ ansible_version_min: "==6.*"
+ ansible_version_max: "==7.*"
# Test latest ansible version on Ubuntu, minimum supported on others.
ansible_version_constraint: >-
{{ ansible_version_min if is_upgrade or base_distro != 'ubuntu' else ansible_version_max }}
@@ -252,6 +257,7 @@
extra_args: "-c {{ upper_constraints_file }}"
name:
- "{{ kolla_ansible_src_dir }}"
+ - "ansible-core{{ ansible_core_version_constraint }}"
- "ansible{{ ansible_version_constraint }}"
- "ara<1.0.0"
virtualenv: "{{ kolla_ansible_venv_path }}"
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index 9fce6e824..f9cb791d0 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -7,8 +7,8 @@ set -o errexit
# do not use _PYTHON_BIN directly, use $(get_python_bin) instead
_PYTHON_BIN=""
-ANSIBLE_VERSION_MIN=2.12
-ANSIBLE_VERSION_MAX=2.13
+ANSIBLE_VERSION_MIN=2.13
+ANSIBLE_VERSION_MAX=2.14
function get_python_bin {
if [ -n "$_PYTHON_BIN" ]; then