From 172bb6ce4fa48ed721f1daf255489d9905fb5906 Mon Sep 17 00:00:00 2001 From: Laurent Indermuehle Date: Mon, 5 May 2025 14:12:04 +0200 Subject: [PATCH] Add query to find command between python and python3 --- 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..e2b2ae3 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