You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ansible/deploy-openstack-config.yml
+13-2Lines changed: 13 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -262,11 +262,22 @@
262
262
become: true
263
263
when: ansible_facts['distribution'] == "Ubuntu"
264
264
265
+
- name: Set a fact about the Python binary to use
266
+
ansible.builtin.set_fact:
267
+
python_binary: "{{ '/usr/bin/python3.12' if ansible_facts['distribution'] == 'Rocky' and (openstack_release.stdout.startswith('master') or openstack_release.stdout.startswith('2025')) else '/usr/bin/python3' }}"
268
+
269
+
- name: Ensure python3.12 is installed (Rocky)
270
+
ansible.builtin.package:
271
+
name: python3.12
272
+
state: present
273
+
become: true
274
+
when: python_binary == '/usr/bin/python3.12'
275
+
265
276
- name: Ensure the latest version of pip is installed
266
277
ansible.builtin.pip:
267
278
name: pip
268
279
virtualenv: "{{ ansible_env.HOME }}/venvs/kayobe"
269
-
virtualenv_command: "/usr/bin/python3 -m venv"
280
+
virtualenv_command: "{{ python_binary }} -m venv"
270
281
state: latest
271
282
272
283
- name: Fix up `kayobe-config` requirements to point to requested version
0 commit comments