Fix some conditionals.

This commit is contained in:
Andrea Dell'Amico 2023-03-01 16:40:20 +01:00
parent 68889c890c
commit 7d4d9fa47a
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 7 additions and 3 deletions

View File

@ -14,12 +14,16 @@
- name: Python minor version of Ubuntu 20.04
ansible.builtin.set_fact:
py3_env_minor_version: '8'
when: ansible_distribution_version is version_compare('20.04', '==')
when:
- not py3_env_ppa_enabled
- ansible_distribution_version is version_compare('20.04', '==')
- name: Python minor version of Ubuntu 22.04
ansible.builtin.set_fact:
py3_env_minor_version: '10'
when: ansible_distribution_version is version_compare('22.04', '==')
when:
- not py3_env_ppa_enabled
- ansible_distribution_version is version_compare('22.04', '==')
- name: Manage the python packages
tags: [python, py3_env, py3_env_pkgs, python3, py3_apt]

View File

@ -16,4 +16,4 @@ py3_el_env_mandatory_pkg:
- 'python{{ py3_env_major_version }}'
- 'python{{ py3_env_major_version }}-pip'
- 'python{{ py3_env_major_version }}-setuptools'
- "python{% if py3_env_ppa_enabled %}{{ py3_el_env_version }}{% else %}{{ py3_env_major_version }}{% endif %}-virtualenv"
- "python{{ py3_env_major_version }}-virtualenv"