summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/pip/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/pip/tasks/main.yml')
-rw-r--r--test/integration/targets/pip/tasks/main.yml14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/integration/targets/pip/tasks/main.yml b/test/integration/targets/pip/tasks/main.yml
index 89955e5ad9..68ecf488ba 100644
--- a/test/integration/targets/pip/tasks/main.yml
+++ b/test/integration/targets/pip/tasks/main.yml
@@ -4,11 +4,17 @@
- name: find virtualenv command
command: "which virtualenv virtualenv-{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}"
register: command
- failed_when: not command.stdout_lines
+ 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] }}"
+ virtualenv: "{{ command.stdout_lines[0] if command is successful else ansible_python_interpreter ~ ' -m virtualenv' }}"
- block:
- name: install git, needed for repo installs
@@ -18,6 +24,10 @@
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