|
26 | 26 | upper_constraints_file: "{{ ansible_env.HOME }}/src/opendev.org/openstack/requirements/upper-constraints.txt"
|
27 | 27 | docker_image_tag_suffix: "{{ '-aarch64' if ansible_architecture == 'aarch64' else '' }}"
|
28 | 28 | kolla_ansible_venv_path: "{{ ansible_env.HOME }}/kolla-ansible-venv"
|
| 29 | + kolla_runtime_venv_path: "{{ ansible_env.HOME }}/kolla-runtime-venv" |
29 | 30 | kolla_internal_fqdn: "kolla.example.com"
|
30 | 31 |
|
31 | 32 | - name: Install dig for Designate testing
|
|
52 | 53 | when:
|
53 | 54 | - scenario == "lets-encrypt"
|
54 | 55 |
|
| 56 | + # NOTE(kevko): Rocky Linux has Python 3.9 as the default, but we want to use Python 3.12 instead. |
| 57 | + - name: Install Python3.12 and dependencies on RHEL derivatives |
| 58 | + dnf: |
| 59 | + name: |
| 60 | + - python3.12 |
| 61 | + - python3.12-devel |
| 62 | + - python3.12-pip |
| 63 | + state: latest |
| 64 | + when: ansible_facts.os_family == 'RedHat' |
| 65 | + become: true |
| 66 | + |
| 67 | + # NOTE(kevko): While in Rocky, virtualenv is included as part of the packages above, in Debuntu, virtualenv is in a separate package. |
| 68 | + - name: Install python3-virtualenv |
| 69 | + package: |
| 70 | + name: python3-virtualenv |
| 71 | + state: present |
| 72 | + update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}" |
| 73 | + become: true |
| 74 | + when: ansible_facts.os_family != 'RedHat' |
| 75 | + |
| 76 | + - name: Create Kolla runtime venv |
| 77 | + command: |
| 78 | + cmd: "{{ 'python3.12' if ansible_facts.os_family == 'RedHat' else 'python3' }} -m venv {{ kolla_runtime_venv_path }}" |
| 79 | + creates: "{{ kolla_runtime_venv_path }}" |
55 | 80 |
|
56 | 81 | - hosts: primary
|
57 | 82 | any_errors_fatal: true
|
|
236 | 261 | state: directory
|
237 | 262 | become: true
|
238 | 263 |
|
239 |
| - - name: Install Python3.12 and dependencies needed for dbus-python on RHEL derivatives |
240 |
| - dnf: |
241 |
| - name: |
242 |
| - - python3.12 |
243 |
| - - python3.12-devel |
244 |
| - - python3.12-pip |
245 |
| - - gcc |
246 |
| - - dbus-devel |
247 |
| - - glib2-devel |
248 |
| - - dbus-x11 |
249 |
| - state: latest |
250 |
| - when: ansible_facts.os_family == 'RedHat' |
251 |
| - become: true |
252 |
| - |
253 | 264 | - name: Create Kolla Ansible venv
|
254 | 265 | command:
|
255 | 266 | cmd: "{{ 'python3.12' if ansible_facts.os_family == 'RedHat' else 'python3' }} -m venv {{ kolla_ansible_venv_path }}"
|
256 | 267 | creates: "{{ kolla_ansible_venv_path }}"
|
257 | 268 |
|
258 |
| - - name: Ensure the latest tested pip |
259 |
| - pip: |
260 |
| - name: "pip==23.*" |
261 |
| - state: latest |
262 |
| - virtualenv: "{{ kolla_ansible_venv_path }}" |
263 |
| - |
264 |
| - - name: Ensure the latest tested setuptools |
265 |
| - pip: |
266 |
| - name: "setuptools==67.2.0" |
267 |
| - state: latest |
268 |
| - virtualenv: "{{ kolla_ansible_venv_path }}" |
269 |
| - |
270 | 269 | - name: Install kolla-ansible and dependencies
|
271 | 270 | pip:
|
272 | 271 | extra_args: "-c {{ upper_constraints_file }}"
|
|
0 commit comments