diff --git a/tasks/py3_deb.yml b/tasks/py3_deb.yml index a970cf2..bfe23a3 100644 --- a/tasks/py3_deb.yml +++ b/tasks/py3_deb.yml @@ -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] diff --git a/vars/main.yml b/vars/main.yml index 6e578e3..d82f3f2 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -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"