role-podman/tasks/main.yml

27 lines
871 B
YAML
Raw Normal View History

2023-09-08 20:41:09 +00:00
---
- name: Gather variables for each operating system
include_vars: "{{ ansible_distribution | lower }}.yml"
- name: "Get Podman version"
become: yes
become_user: podman_rootless
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
ignore_errors: true
2023-09-16 14:23:25 +00:00
when: podman_version_check|bool
- name: "test"
debug:
msg: "{{ podman_active_version }}"
2023-09-15 09:31:38 +00:00
- include_tasks: setup_user.yml
when: (not podman_version_check|bool) or (podman_active_version.stdout != podman_version)
2023-09-15 09:31:38 +00:00
2023-09-08 20:41:09 +00:00
- include_tasks: install.yml
when: (not podman_version_check|bool) 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
when: (not podman_version_check|bool) or (podman_active_version.stdout != podman_version)