group => buildd,
owner => buildd,
}
- file { '/var/lib/systemd/linger':
- ensure => directory,
- mode => '755',
- }
- file { "/var/lib/systemd/linger/buildd":
- ensure => present,
- }
+ dsa_systemd::linger { 'buildd': }
file { '/etc/systemd/journald.conf.d':
ensure => directory,
mode => '755',
*/10 * * * * root /usr/local/sbin/systemd-cleanup-failed
| EOF
}
+
+ # systemd bug on buster, maybe related to https://github.com/systemd/systemd/issues/12401
+ # | root@onionoo-backend-01:~# loginctl enable-linger onionoo
+ # | Could not enable linger: No such file or directory
+ # Having the /var/lib/systemd/linger directory exist already enables
+ # us to just define file resources in dsa_systemd::linger. That won't
+ # start the user session immediately, but it'll work after a reboot
+ file { '/var/lib/systemd/linger':
+ mode => '0755',
+ ensure => 'directory',
+ }
}
--- /dev/null
+# enable (or disable) lingering for a user
+define dsa_systemd::linger(
+ Enum['present','absent'] $ensure = 'present',
+) {
+ include dsa_systemd
+
+ file { "/var/lib/systemd/linger/${name}":
+ ensure => $ensure,
+ }
+}
key => true,
}
- file { '/var/lib/systemd/linger':
- ensure => directory,
- mode => '755',
- }
- file { '/var/lib/systemd/linger/jenkins':
- ensure => present,
- }
+ dsa_systemd::linger { 'jenkins': }
}
class roles::sreview {
ssl::service { 'sreview.debian.net': notify => Exec['service apache2 reload'], key => true, }
- file { '/var/lib/systemd/linger':
- ensure => directory,
- mode => '755',
- }
- file { '/var/lib/systemd/linger/sreview':
- ensure => present,
- }
+ dsa_systemd::linger { 'sreview': }
}