diff options
author | Jesse Pretorius (odyssey4me) <jesse@odyssey4.me> | 2020-02-13 21:32:11 +0000 |
---|---|---|
committer | Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> | 2020-04-23 18:13:30 +0200 |
commit | da390b297e64878512bd96ffde4283bb0694c9b5 (patch) | |
tree | cb4dd9ab40b95e49a72f4f79bb637712e417d639 /test/integration/targets/pip | |
parent | f27c417fc4eb39f993a0dcf950bce88e5ab0b0ef (diff) | |
download | ansible-da390b297e64878512bd96ffde4283bb0694c9b5.tar.gz |
[pip] Enable virtualenv_command to have arguments
Currently if virtualenv_command has arguments, then the
search for the binary in the path does not work so the
user has to specify the full path to it.
To allow arguments to be used without having to specify
the path to the binary, we split the module argument into
the command and anything after the first space.
This makes using this module argument more flexible and
user friendly.
Fixes: #52275
Diffstat (limited to 'test/integration/targets/pip')
-rw-r--r-- | test/integration/targets/pip/tasks/pip.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index c119f5726e..477d4e601b 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -517,6 +517,32 @@ that: "'distribute' in remove_distribute.cmd" when: ansible_python.version.major == 2 +### test virtualenv_command begin ### + +- name: Test virtualenv command with arguments + when: "ansible_system == 'Linux'" + block: + - name: make sure the virtualenv does not exist + file: + state: absent + name: "{{ output_dir }}/pipenv" + + # ref: https://github.com/ansible/ansible/issues/52275 + - name: install using virtualenv_command with arguments + pip: + name: "{{ pip_test_package }}" + virtualenv: "{{ output_dir }}/pipenv" + virtualenv_command: "virtualenv --verbose" + state: present + register: version13 + + - name: ensure install using virtualenv_command with arguments was successful + assert: + that: + - "version13 is success" + +### test virtualenv_command end ### + # https://github.com/ansible/ansible/issues/68592 # Handle pre-release version numbers in check_mode for already-installed # packages. |