Merge "Only add --no-site-packages when necessary"
This commit is contained in:
commit
54b46788b3
|
@ -48,8 +48,7 @@
|
|||
- name: Create the virtualenv (if it does not exist)
|
||||
command: >-
|
||||
virtualenv
|
||||
--no-site-packages
|
||||
{{ _venv_create_no_download }}
|
||||
{{ _venv_create_extra_options }}
|
||||
--python={{ venv_python_executable }}
|
||||
{{ (ansible_pkg_mgr == 'apt') | ternary('--always-copy', '') }}
|
||||
{{ venv_install_destination_path }}
|
||||
|
|
|
@ -40,10 +40,11 @@
|
|||
- ((_virtualenv_version.stdout | trim) == 'none') or
|
||||
((_virtualenv_version.stdout | trim) is version_compare('1.10', '<'))
|
||||
|
||||
- name: Set the correct virtualenv parameter to prevent downloads when creating
|
||||
- name: Set extra virtualenv parameters
|
||||
set_fact:
|
||||
_venv_create_no_download: >-
|
||||
_venv_create_extra_options: >-
|
||||
{{ ((_virtualenv_version.stdout | trim) is version_compare('14.0.0', '<')) | ternary('--never-download', '--no-download') }}
|
||||
{{ ((_virtualenv_version.stdout | trim) is version_compare('1.7.0', '<')) | ternary('--no-site-packages', '') }}
|
||||
|
||||
- name: Check whether the venv_install_source_path is a URL or a file path
|
||||
set_fact:
|
||||
|
|
Loading…
Reference in New Issue