35b0fef536
* Use default group of staff on macos to prevent sudo issues * Install gnu-tar for macos in git and unarchive tests * Enable timezone module to support py3 on macos * If the virtualenv command is missing, try python -m virtualenv * Install passlib for filter_core on macos * Install paramiko via pip on macos for paramiko tests * Normalize discovered python interpreter on macos * Get pip tests passing, by ensuring we have wheel installed * Create /etc/ansible for ca certs on mac, list lookup_url as destructive * Fixups for CA certs * Include macos * Dynamically get cafile instead of hardcoding the path
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
# Current pip unconditionally uses md5.
|
|
# We can re-enable if pip switches to a different hash or allows us to not check md5.
|
|
|
|
- name: find virtualenv command
|
|
command: "which virtualenv virtualenv-{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}"
|
|
register: command
|
|
ignore_errors: true
|
|
|
|
- name: is virtualenv available to python -m
|
|
command: '{{ ansible_python_interpreter }} -m virtualenv'
|
|
register: python_m
|
|
when: not command.stdout_lines
|
|
failed_when: python_m.rc != 2
|
|
|
|
- name: remember selected virtualenv command
|
|
set_fact:
|
|
virtualenv: "{{ command.stdout_lines[0] if command is successful else ansible_python_interpreter ~ ' -m virtualenv' }}"
|
|
|
|
- block:
|
|
- name: install git, needed for repo installs
|
|
package:
|
|
name: git
|
|
state: present
|
|
when: ansible_distribution not in ["MacOSX", "Alpine"]
|
|
register: git_install
|
|
|
|
- name: ensure wheel is installed
|
|
pip:
|
|
name: wheel
|
|
|
|
- include_tasks: pip.yml
|
|
always:
|
|
- name: platform specific cleanup
|
|
include_tasks: "{{ cleanup_filename }}"
|
|
with_first_found:
|
|
- "{{ ansible_distribution | lower }}_cleanup.yml"
|
|
- "default_cleanup.yml"
|
|
loop_control:
|
|
loop_var: cleanup_filename
|
|
when: ansible_fips|bool != True
|
|
module_defaults:
|
|
pip:
|
|
virtualenv_command: "{{ virtualenv }}"
|