Enable user session linger for runner users.

This commit is contained in:
Magnus Andersson 2024-01-19 10:50:39 +01:00
parent 92740834a2
commit 9d164c16a5
Signed by: mandersson
GPG key ID: 19CB2C58E1F19B16

View file

@ -46,5 +46,12 @@ class podmanrunner::runner (
owner => "${username}${x}",
group => "${username}${x}",
}
exec { "enable-${username}${x}-linger":
command => "loginctl enable-linger ${username}${x}",
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
logoutput => false,
unless => "test -f /var/lib/systemd/linger/${username}${x}",
}
}
}