ensure-python: pull in venv package on Debuntu
When installing from packages on Debuntu, also bring in the python<version>-venv package as a base dependency. Change-Id: Ie3c03fea82bcec80a897f0905c15f35405a50396
This commit is contained in:
parent
a46b34b9f7
commit
02b8b63d09
@ -16,7 +16,22 @@
|
|||||||
when:
|
when:
|
||||||
- ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
- ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||||
package:
|
package:
|
||||||
name: python{{ python_version }}-dev
|
name:
|
||||||
|
- 'python{{ python_version }}-dev'
|
||||||
|
state: present
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
# Ubuntu splits out the venv package, which is really the only
|
||||||
|
# sane way to use a non-default-but-packaged version of python on
|
||||||
|
# your system (i.e. via virtual environments setup with python<v>
|
||||||
|
# -m venv). Pull it in by default for python3.
|
||||||
|
- name: Pull in venv package
|
||||||
|
when:
|
||||||
|
- ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||||
|
- python_version is version('3', '>')
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- 'python{{ python_version }}-venv'
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user