diff --git a/roles/ensure-tox/defaults/main.yml b/roles/ensure-tox/defaults/main.yml new file mode 100644 index 000000000..35e4a9af6 --- /dev/null +++ b/roles/ensure-tox/defaults/main.yml @@ -0,0 +1 @@ +tox_executable: tox \ No newline at end of file diff --git a/roles/ensure-tox/tasks/main.yaml b/roles/ensure-tox/tasks/main.yaml index 03ec536fa..55cd0b585 100644 --- a/roles/ensure-tox/tasks/main.yaml +++ b/roles/ensure-tox/tasks/main.yaml @@ -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"