From f1b6f5d2045004f5105963c00292b1090c524696 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Mon, 26 Nov 2018 16:25:50 -0800 Subject: [PATCH] [stable-2.7] Use virtualenv in pip test to remove distribute. (cherry picked from commit 6f29eafef4d8fc49645d2382c444e9416f8ab38d) Co-authored-by: Matt Clay --- test/integration/targets/pip/tasks/pip.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index d0695b747f1..173946bfee5 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -501,10 +501,22 @@ state: absent # https://github.com/ansible/ansible/issues/47198 +- name: make sure the virtualenv does not exist + file: + state: absent + name: "{{ output_dir }}/pipenv" + +- name: install distribute in the virtualenv + pip: + name: distribute + virtualenv: "{{ output_dir }}/pipenv" + state: present + - name: try to remove distribute pip: state: "absent" name: "distribute" + virtualenv: "{{ output_dir }}/pipenv" ignore_errors: yes register: remove_distribute