ensure-tox: save tox_executable fact
If we install our own local version of tox, we should set a fact with the tox_executable so other tasks can leverage it. Change-Id: If6895bbb898261e88c0e3083d21210209f79995f
This commit is contained in:
parent
7a1684fffb
commit
45a3790d85
1
roles/ensure-tox/defaults/main.yml
Normal file
1
roles/ensure-tox/defaults/main.yml
Normal file
@ -0,0 +1 @@
|
||||
tox_executable: tox
|
@ -14,5 +14,11 @@
|
||||
register: result
|
||||
changed_when: "'Successfully installed' in result.stdout"
|
||||
|
||||
- name: Set tox_executable fact
|
||||
set_fact:
|
||||
tox_executable: "{{ ansible_user_dir }}/.local/bin/tox"
|
||||
cacheable: true
|
||||
when: result is changed
|
||||
|
||||
- name: Output tox version
|
||||
command: tox --version
|
||||
command: "{{ tox_executable }} --version"
|
||||
|
Loading…
Reference in New Issue
Block a user