Check for virtualenv binary
The current check looks for a virtualenv package; but this isn't portable to other platforms. In the gate we also have installed from upstream (to ensure latest) and the package might be on hold, etc which might mess up the detection. I think the KISS thing to do is to check for virtualenv and fail with a useful message. Change-Id: Icf15ddd18ca52885f5c4a89a7d83622a70c811d5
This commit is contained in:
parent
dcbf25e2c9
commit
89bfc2a9fb
|
@ -3,12 +3,18 @@
|
|||
src: "{{ test_matrix_features }}"
|
||||
dest: "{{ ansible_user_dir }}"
|
||||
|
||||
- name: Check for virtualenv
|
||||
command: which virtualenv
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: virtualenv_available
|
||||
|
||||
- name: Ensure virtualenv is installed
|
||||
become: true
|
||||
package:
|
||||
name: virtualenv
|
||||
state: present
|
||||
when: ansible_os_family != 'Darwin'
|
||||
fail:
|
||||
msg: "Please ensure virtualenv is available!"
|
||||
when:
|
||||
- virtualenv_available | failed
|
||||
- ansible_os_family != 'Darwin'
|
||||
|
||||
- name: Install PyYAML to parse the test matrix
|
||||
pip:
|
||||
|
|
Loading…
Reference in New Issue