From b59312e36cedb3bc0da1a94278ce81e3fcfdf296 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 8 Jan 2026 12:01:37 +0000 Subject: [PATCH] bifrost/kolla-toolbox: Bump ansible-core to 2.20 Set inject_facts_as_vars to False to match what we do in Kolla-Ansible (and this option will default to False in 2.24) Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/972696 Change-Id: Iae2b70ca62fd68400bde9296edcda8e53f14a896 Signed-off-by: Michal Nasiadka --- docker/bifrost/bifrost-base/Dockerfile.j2 | 16 ++-------------- docker/kolla-toolbox/Dockerfile.j2 | 2 +- docker/kolla-toolbox/ansible.cfg | 3 ++- docker/kolla-toolbox/requirements.yml | 8 ++++---- .../ansible-core-2-20-bd912e1767d5f197.yaml | 5 +++++ 5 files changed, 14 insertions(+), 20 deletions(-) create mode 100644 releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2 index e31a12b326..27e3455e94 100644 --- a/docker/bifrost/bifrost-base/Dockerfile.j2 +++ b/docker/bifrost/bifrost-base/Dockerfile.j2 @@ -28,13 +28,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(bifrost_base_packages | customizable("packages")) }} -{# Ensure we use Python 3.12 on RPM-based systems #} -{% if base_package_type == 'rpm' %} -RUN cd /usr/bin && \ - rm -f python3 && \ - ln -s python3.12 python3 -{% endif %} - ENV VENV {{ venv_path }} {% set bifrost_base_pip_packages = [ @@ -47,12 +40,7 @@ COPY build_arg.yml /tmp/build_arg.yml RUN mkdir -p /requirements \ && curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \ && python3 -m venv --system-site-packages {{ venv_path }} \ - && KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \ - && cd {{ venv_path }}/lib \ - && rm -f python3 \ - && ln -s python${KOLLA_DISTRO_PYTHON_VERSION} python3 - -RUN ln -s bifrost-base-source/* bifrost \ + && ln -s bifrost-base-source/* bifrost \ && {{ macros.install_pip(['pip', 'wheel', 'setuptools']) }} \ && {{ macros.install_pip(bifrost_base_pip_packages | customizable("pip_packages")) }} @@ -67,7 +55,7 @@ RUN apt-get --error-on=any update && \ {%- else %} RUN echo " " && \ {%- endif %} - bash -c '$VENV/bin/pip install "ansible>=12,<13" && \ + bash -c '$VENV/bin/pip install "ansible>=12,<14" && \ $VENV/bin/ansible-galaxy collection install -r /bifrost/ansible-collections-requirements.yml && \ $VENV/bin/ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target \ /bifrost/playbooks/install.yaml \ diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index 9f97ed3866..6a0796bfbe 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -96,7 +96,7 @@ RUN mkdir -p /requirements \ ENV PATH {{ venv_path }}/bin:$PATH {% set kolla_toolbox_pip_packages = [ - 'ansible-core==2.19.*', + 'ansible-core==2.20.*', 'cmd2', 'influxdb', 'openstacksdk', diff --git a/docker/kolla-toolbox/ansible.cfg b/docker/kolla-toolbox/ansible.cfg index 53708de396..ec505f4a47 100644 --- a/docker/kolla-toolbox/ansible.cfg +++ b/docker/kolla-toolbox/ansible.cfg @@ -1,3 +1,4 @@ [defaults] -remote_tmp = /tmp +inject_facts_as_vars = False log_path = /var/log/kolla/ansible.log +remote_tmp = /tmp diff --git a/docker/kolla-toolbox/requirements.yml b/docker/kolla-toolbox/requirements.yml index 0c4025d018..83c7951429 100644 --- a/docker/kolla-toolbox/requirements.yml +++ b/docker/kolla-toolbox/requirements.yml @@ -1,11 +1,11 @@ --- collections: - name: ansible.posix - version: '<2' - - name: community.general - version: '<4' - - name: community.mysql version: '<3' + - name: community.general + version: '<13' + - name: community.mysql + version: '<5' - name: community.rabbitmq version: '<2' - name: openstack.cloud diff --git a/releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml b/releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml new file mode 100644 index 0000000000..bf7ac0e7d7 --- /dev/null +++ b/releasenotes/notes/ansible-core-2-20-bd912e1767d5f197.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Version of ``ansible-core`` in ``kolla-toolbox`` has been updated to + ``2.20``.