From 54645685a8d10f4f02388a2db50c95762d2f47a2 Mon Sep 17 00:00:00 2001 From: Guillaume Chauvel Date: Fri, 29 May 2020 22:13:17 +0200 Subject: [PATCH] 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 --- roles/ensure-tox/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ensure-tox/tasks/main.yaml b/roles/ensure-tox/tasks/main.yaml index 8c8fa68e4..dff39a0f1 100644 --- a/roles/ensure-tox/tasks/main.yaml +++ b/roles/ensure-tox/tasks/main.yaml @@ -14,7 +14,7 @@ - name: Export preinstalled tox_exectuable set_fact: - tox_executable: '{{ tox_executable }}' + tox_executable: '{{ tox_preinstalled.stdout }}' cacheable: true when: tox_preinstalled.rc == 0