ensure-tox: fix tox_executable fact when tox is preinstalled

While making test with a node:
- with tox installed using "pip install --user" as a non-root user
- PATH modified using ~/.ssh/environment
- declared in nodepool to run as this non-root user

tox checks produce an error:
"Check if tox is installed" evalues correctly (shell, bash)
"Output tox version" cannot find tox (command, no sh, no etc ...)

This change sets fact using the output of the first install check

Change-Id: I5886858bcd57afc8ea5fd121ad44bd82afb1a671
This commit is contained in:
Guillaume Chauvel 2020-05-29 22:13:17 +02:00
parent 4090d65dab
commit 54645685a8

View File

@ -14,7 +14,7 @@
- name: Export preinstalled tox_exectuable - name: Export preinstalled tox_exectuable
set_fact: set_fact:
tox_executable: '{{ tox_executable }}' tox_executable: '{{ tox_preinstalled.stdout }}'
cacheable: true cacheable: true
when: tox_preinstalled.rc == 0 when: tox_preinstalled.rc == 0