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:
Mohammed Naser 2020-02-04 20:41:08 +01:00
parent 7a1684fffb
commit 45a3790d85
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1 @@
tox_executable: tox

View File

@ -14,5 +14,11 @@
register: result register: result
changed_when: "'Successfully installed' in result.stdout" 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 - name: Output tox version
command: tox --version command: "{{ tox_executable }} --version"