2016-10-13 04:33:12 +02:00
|
|
|
# Current pip unconditionally uses md5.
|
|
|
|
# We can re-enable if pip switches to a different hash or allows us to not check md5.
|
2016-09-21 02:56:07 +02:00
|
|
|
|
2019-03-27 21:56:28 +01:00
|
|
|
- name: find virtualenv command
|
|
|
|
command: "which virtualenv virtualenv-{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}"
|
|
|
|
register: command
|
|
|
|
failed_when: not command.stdout_lines
|
|
|
|
|
|
|
|
- name: remember selected virtualenv command
|
|
|
|
set_fact:
|
|
|
|
virtualenv: "{{ command.stdout_lines[0] }}"
|
|
|
|
|
2019-03-28 23:09:17 +01:00
|
|
|
- block:
|
|
|
|
- name: install git, needed for repo installs
|
|
|
|
package:
|
|
|
|
name: git
|
|
|
|
state: present
|
|
|
|
when: ansible_distribution != "MacOSX"
|
|
|
|
register: git_install
|
|
|
|
|
|
|
|
- include_tasks: pip.yml
|
|
|
|
always:
|
|
|
|
- name: remove unwanted packages
|
|
|
|
package:
|
|
|
|
name: git
|
|
|
|
state: absent
|
|
|
|
when: git_install.changed
|
|
|
|
|
|
|
|
- name: remove auto-installed packages from FreeBSD
|
|
|
|
pkgng:
|
|
|
|
name: git
|
|
|
|
state: absent
|
|
|
|
autoremove: yes
|
|
|
|
when: git_install.changed and ansible_distribution == "FreeBSD"
|
2016-10-13 04:33:12 +02:00
|
|
|
when: ansible_fips|bool != True
|
2019-03-27 21:56:28 +01:00
|
|
|
module_defaults:
|
|
|
|
pip:
|
|
|
|
virtualenv_command: "{{ virtualenv }}"
|