From a39b3f7cda29fea59bd0ea6288df2086e59f0589 Mon Sep 17 00:00:00 2001 From: Bartosz Bezak Date: Mon, 12 Sep 2022 18:33:20 +0200 Subject: [PATCH] moved to 'python3 -m venv' to create virtualenv In RHEL9 derivatives python3-virtualenv package is in EPEL9 now. Change-Id: I22a14bc095f018a1276e5630bf598411c7d8cb54 --- roles/docker_sdk/defaults/main.yml | 1 - roles/docker_sdk/tasks/main.yml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/docker_sdk/defaults/main.yml b/roles/docker_sdk/defaults/main.yml index 4dba176..822bfa9 100644 --- a/roles/docker_sdk/defaults/main.yml +++ b/roles/docker_sdk/defaults/main.yml @@ -3,7 +3,6 @@ docker_sdk_packages: - "python3-setuptools" - "python3-pip" - - "{% if virtualenv is not none %}python3-virtualenv{% endif %}" # List of Python packages to install via Pip. # NOTE(hrw) docker 2.4.2 is in kolla-ansible requirements diff --git a/roles/docker_sdk/tasks/main.yml b/roles/docker_sdk/tasks/main.yml index ece71df..4b2ced1 100644 --- a/roles/docker_sdk/tasks/main.yml +++ b/roles/docker_sdk/tasks/main.yml @@ -13,7 +13,7 @@ name: pip>19.3 virtualenv: "{{ virtualenv }}" virtualenv_site_packages: "{{ virtualenv_site_packages }}" - virtualenv_python: "python{{ host_python_version }}" + virtualenv_command: "python{{ host_python_version }} -m venv" become: true become_user: "{{ docker_sdk_virtualenv_owner }}" when: virtualenv is not none @@ -25,6 +25,6 @@ extra_args: "{% if docker_sdk_upper_constraints_file %}-c {{ docker_sdk_upper_constraints_file }}{% endif %}" virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}" virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}" - virtualenv_python: "{{ virtualenv is none | ternary(omit, 'python' ~ host_python_version) }}" + virtualenv_command: "{{ virtualenv is none | ternary(omit, 'python' ~ host_python_version ~ ' -m venv') }}" become: true become_user: "{{ virtualenv is none | ternary(omit, docker_sdk_virtualenv_owner) }}"