Ensure systemd user service manager is enabled

This is required to have the rootless containers start at boot.
This commit is contained in:
Ivo C.S. Wingelaar 2024-10-07 03:20:30 +02:00
parent 37ac2e0403
commit 65ec7e94d0
Signed by: ivo
GPG key ID: ABBED434F58D0AA3

View file

@ -41,3 +41,10 @@
system: false system: false
state: present state: present
loop: "{{ sce_service_accounts }}" loop: "{{ sce_service_accounts }}"
# Needed to have containers start at host boot
- name: Ensure systemd user service manager will run without a login session for the Podman service account(s)
ansible.builtin.command:
cmd: loginctl enable-linger {{ item }}
creates: /var/lib/systemd/linger/{{ item }}
loop: "{{ sce_service_accounts }}"