diff options
author | Jordan Borean <jborean93@gmail.com> | 2018-12-07 10:24:46 +1000 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2018-12-07 07:10:03 -0800 |
commit | 46fc6caf52284501275c8a219ceedaa7fde5f67c (patch) | |
tree | f26e0ecd49f1a49675f5f4f7d8271326db2bce10 | |
parent | c7677eee83e5c0aa39fd60016fe6aa5e37dcd0a5 (diff) | |
download | ansible-46fc6caf52284501275c8a219ceedaa7fde5f67c.tar.gz |
pip tests: skip distribute test case for py3 compat (#49636)
(cherry picked from commit 28a903a1e2c45b1929ea9036bf2d696dcd51b7a5)
-rw-r--r-- | test/integration/targets/pip/tasks/pip.yml | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index 173946bfee..2b5a8ac486 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -501,25 +501,28 @@ 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 - -- name: inspect the cmd - assert: - that: "'distribute' in remove_distribute.cmd" +# distribute is a legacy package that will fail on newer Python 3 versions +- block: + - 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 + + - name: inspect the cmd + assert: + that: "'distribute' in remove_distribute.cmd" + when: ansible_python.version.major == 2 |