From 06e23c8ac3b96b0dbef31eb9020677560ec0dc65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Inderm=C3=BChle?= Date: Tue, 6 May 2025 09:05:41 +0200 Subject: [PATCH] Add query to find command between python and python3 (#715) * Add query to find command between python and python3 * Cut extra $ --- tests/integration/targets/setup_controller/tasks/verify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/setup_controller/tasks/verify.yml b/tests/integration/targets/setup_controller/tasks/verify.yml index b47e354..d3d615f 100644 --- a/tests/integration/targets/setup_controller/tasks/verify.yml +++ b/tests/integration/targets/setup_controller/tasks/verify.yml @@ -42,8 +42,8 @@ - connector_name == 'mysqlclient' - name: Get the python version in use - ansible.builtin.command: - cmd: python -V + ansible.builtin.shell: + cmd: echo $( $(command -v python || command -v python3) -V ) changed_when: false failed_when: false register: python_version_in_use @@ -52,7 +52,7 @@ ansible.builtin.debug: msg: > Python in use inside the test container: - ${{ python_version_in_use }} + {{ python_version_in_use.stdout }} when: - python_version_in_use is defined