Skip to content

Commit 008e006

Browse files
authored
Adds os_openstackclient_virtualenv_command
Depending on the version of upper constraints, you may need to use a newer python interpreter.
1 parent 47b2eba commit 008e006

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

roles/os_openstackclient/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
os_openstackclient_venv:
44
# Whether to install package dependencies.
55
os_openstackclient_install_package_dependencies: true
6+
# Value to use for the pip module's `virtualenv_command` argument when creating the virtualenv
7+
os_openstackclient_virtualenv_command: "{{ 'python3.' ~ ansible_facts.python.version.minor ~ ' -m venv' if os_openstackclient_venv else omit }}"
68

79
# State of the openstackclient package.
810
os_openstackclient_state: present
@@ -11,3 +13,4 @@ os_openstackclient_state: present
1113
os_openstackclient_version:
1214
# Upper constraints file for installation of openstackclient.
1315
os_openstackclient_upper_constraints_file: https://releases.openstack.org/constraints/upper/2024.1
16+

roles/os_openstackclient/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
name: "{{ item.name }}"
4141
state: latest
4242
virtualenv: "{{ os_openstackclient_venv or omit }}"
43-
virtualenv_command: "{{ 'python3.' ~ ansible_facts.python.version.minor ~ ' -m venv' if os_openstackclient_venv else omit }}"
43+
virtualenv_command: "{{ os_openstackclient_virtualenv_command }}"
4444
with_items:
4545
- { name: pip }
4646
- { name: setuptools }

0 commit comments

Comments
 (0)