|
|
|
@ -1,6 +1,9 @@
|
|
|
|
|
# Current pip unconditionally uses md5.
|
|
|
|
|
# We can re-enable if pip switches to a different hash or allows us to not check md5.
|
|
|
|
|
|
|
|
|
|
- name: Python 2
|
|
|
|
|
when: ansible_python.version.major == 2
|
|
|
|
|
block:
|
|
|
|
|
- name: find virtualenv command
|
|
|
|
|
command: "which virtualenv virtualenv-{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}"
|
|
|
|
|
register: command
|
|
|
|
@ -16,6 +19,13 @@
|
|
|
|
|
set_fact:
|
|
|
|
|
virtualenv: "{{ command.stdout_lines[0] if command is successful else ansible_python_interpreter ~ ' -m virtualenv' }}"
|
|
|
|
|
|
|
|
|
|
- name: Python 3+
|
|
|
|
|
when: ansible_python.version.major > 2
|
|
|
|
|
block:
|
|
|
|
|
- name: remember selected virtualenv command
|
|
|
|
|
set_fact:
|
|
|
|
|
virtualenv: "{{ ansible_python_interpreter ~ ' -m venv' }}"
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
- name: install git, needed for repo installs
|
|
|
|
|
package:
|
|
|
|
|