--- - name: Gather variables for each operating system include_vars: "{{ ansible_distribution | lower }}.yml" - name: Set values for root or rootless running set_fact: become: "{{ podman_rootless }}" - name: "Get Podman version" ansible.builtin.shell: "echo v$(podman --version | cut -d' ' -f 3)" register: podman_active_version changed_when: false failed_when: false ignore_errors: true when: podman_version_check|bool - include_tasks: install.yml when: (not podman_version_check|bool) or podman_active_version.stdout is not defined or podman_active_version.stdout != podman_version - include_tasks: systemd-services.yml when: (not podman_version_check|bool) or podman_active_version.stdout is not defined or podman_active_version.stdout != podman_version