docker & docker_compose: Use virtualenv & correct python version
This ensures failure when trying to install newer versions, that are not supported on python2.7 anymore, when python3 is also installed on the system.
This commit is contained in:
parent
0372930098
commit
06fa8b98ef
2 changed files with 3 additions and 1 deletions
|
@ -48,7 +48,8 @@
|
|||
pip:
|
||||
name: "{{ docker_pip_package }}"
|
||||
state: "{{ docker_pip_package_state }}"
|
||||
extra_args: "--target {{ docker_python_package_path }}"
|
||||
virtualenv: "{{ docker_python_package_path }}"
|
||||
virtualenv_python: "python{{ ansible_python_version | regex_search('\\d+\\.\\d+') }}"
|
||||
version: "{{ docker_pip_package_version }}"
|
||||
become: true
|
||||
changed_when: false
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
name: "{{ docker_compose_pip_package }}"
|
||||
state: "{{ docker_compose_pip_package_state }}"
|
||||
virtualenv: "{{ docker_compose_python_package_path }}"
|
||||
virtualenv_python: "python{{ ansible_python_version | regex_search('\\d+\\.\\d+') }}"
|
||||
version: "{{ docker_compose_pip_package_version | default(omit) }}"
|
||||
become: true
|
||||
changed_when: false
|
||||
|
|
Loading…
Add table
Reference in a new issue