From fa2591d327dcf128c0025580bb0c97e43013e861 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Wed, 17 Apr 2024 14:32:38 +0200 Subject: kolla-toolbox: Use py311 on rpm distros ansible-core 2.16 requires py3.10+ on the host running ansible-playbook - let's use Python 3.11 on RPM distros to have the same version of ansible-core used on all distributions. Change-Id: I2caf2c972cd0283889fadde01bdd6a53e5f66ed9 --- docker/macros.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docker/macros.j2') diff --git a/docker/macros.j2 b/docker/macros.j2 index 257c7b58e..2f1aaf81e 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -32,9 +32,9 @@ {% endif %} {%- endmacro %} -{% macro install_pip(packages, constraints = true) %} +{% macro install_pip(packages, constraints=true, python_version='3') %} {%- if packages is sequence and packages|length > 0 -%} - python3 -m pip --no-cache-dir install --upgrade{{ ' ' }} + python{{ python_version }} -m pip --no-cache-dir install --upgrade{{ ' ' }} {%- if constraints %}-c /requirements/upper-constraints.txt {% endif -%} {{ packages | join(' ') }} {%- else -%} -- cgit v1.2.3