From b767a7bb7147b1b28c7d8700f69a634cb2415911 Mon Sep 17 00:00:00 2001 From: Lennard Brinkhaus Date: Sat, 16 Sep 2023 14:23:25 +0000 Subject: [PATCH] fix: use environment in command --- tasks/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 0a699f3..14bedf4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,13 +5,11 @@ - name: "Get Podman version" become: yes become_user: podman_rootless - ansible.builtin.shell: "echo v$(podman --version | cut -d' ' -f 3)" + ansible.builtin.shell: " XDG_RUNTIME_DIR=/run/user/2534 echo v$(podman --version | cut -d' ' -f 3)" register: podman_active_version changed_when: false failed_when: false - when: podman_version_check|bool - environment: - XDG_RUNTIME_DIR=/run/user/2534 + when: podman_version_check|bool - name: "test" debug: