From 65ec7e94d036d630d371b7dd406994f5cf84779a Mon Sep 17 00:00:00 2001 From: "Ivo C.S. Wingelaar" Date: Mon, 7 Oct 2024 03:20:30 +0200 Subject: [PATCH] Ensure systemd user service manager is enabled This is required to have the rootless containers start at boot. --- roles/install/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/install/tasks/main.yml b/roles/install/tasks/main.yml index baf280b..9a105fe 100644 --- a/roles/install/tasks/main.yml +++ b/roles/install/tasks/main.yml @@ -41,3 +41,10 @@ system: false state: present 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 }}"