From a3f18157172806ee71f8fddad2d4958935c4dbb6 Mon Sep 17 00:00:00 2001 From: Mike Holloway Date: Sat, 17 Aug 2024 12:54:48 -0400 Subject: [PATCH] loginctl enable-linger to keep containers in remote sessions running after logout --- tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 19a2944..3ec38a7 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -16,6 +16,11 @@ dest: /etc/pam.d/sshd line: "session optional pam_systemd.so" +- name: Enable remote login session linger + command: + cmd: loginctl enable-linger "{{ item }}" + loop: + "{{ service_users }}" # - name: Copy cni networking driver config into place # blockinfile: # name: "/etc/cni/net.d/podman.conflist"