15 lines
434 B
YAML
15 lines
434 B
YAML
- name: Install Podman
|
|
ansible.builtin.dnf:
|
|
name: ["podman", "podman-docker", "podman-compose"]
|
|
state: present
|
|
|
|
- name: Check if linger file exists
|
|
ansible.builtin.stat:
|
|
path: "/var/lib/systemd/linger/{{ target_user }}"
|
|
register: linger_file
|
|
changed_when: false
|
|
|
|
- name: Enable lingering if file doesn't exist
|
|
ansible.builtin.command: loginctl enable-linger {{ target_user }}
|
|
when: not linger_file.stat.exists
|