2023-09-08 20:41:09 +00:00
|
|
|
---
|
|
|
|
- name: Gather variables for each operating system
|
|
|
|
include_vars: "{{ ansible_distribution | lower }}.yml"
|
|
|
|
|
2023-09-17 19:34:35 +00:00
|
|
|
- name: Set values for root or rootless running
|
|
|
|
set_fact:
|
|
|
|
become: "{{ podman_rootless }}"
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-15 18:55:13 +00:00
|
|
|
- name: "Get Podman version"
|
2023-09-17 19:34:35 +00:00
|
|
|
ansible.builtin.shell: "echo v$(podman --version | cut -d' ' -f 3)"
|
2023-09-15 18:55:13 +00:00
|
|
|
register: podman_active_version
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
2023-09-16 14:34:38 +00:00
|
|
|
ignore_errors: true
|
2023-09-17 19:34:35 +00:00
|
|
|
when: podman_version_check|bool
|
2023-09-15 09:31:38 +00:00
|
|
|
|
2023-09-08 20:41:09 +00:00
|
|
|
- include_tasks: install.yml
|
2023-09-16 14:48:47 +00:00
|
|
|
when: (not podman_version_check|bool) or podman_active_version.stdout is not defined or podman_active_version.stdout != podman_version
|
2023-09-08 20:41:09 +00:00
|
|
|
|
2023-09-13 21:40:39 +00:00
|
|
|
- include_tasks: systemd-services.yml
|
2023-09-16 14:48:47 +00:00
|
|
|
when: (not podman_version_check|bool) or podman_active_version.stdout is not defined or podman_active_version.stdout != podman_version
|