Closed traylenator closed 3 months ago
New defined type systemd::user_service has two roles:
systemd::user_service
It can globally enable a user unit for all users. e.g:
systemd::user_service { 'systemd-tmpfiles-clean.service': enable => true, global => true, }
It can start/stop/enable/disable a service running for a particular user. e.g
systemd::user_service { 'ssh-agent.socket': ensure => 'running', enable => true, user => 'steve', }
The type instance can also be notified to reload the unit running under a systemd --user instance.
systemd --user
file { '/home/steve/.gpg.conf': ensure => file, content => 'custom', notify => Systemd::User_service['steve-gpg-agent.socket'], } systemd::user_service { 'steve-gpg-agent.socket': ensure => true, unit => 'gpg-agent.socket', enable => true, user => 'steve', }
Note that no notification of systemd::daemon_reload{'me': user => 'me'} is currently made at suitable points. Handle this later.
systemd::daemon_reload{'me': user => 'me'}
Fixes: #381 Fixes: #139 Fixes: #328
Pull Request (PR) description
New defined type
systemd::user_service
has two roles:It can globally enable a user unit for all users. e.g:
It can start/stop/enable/disable a service running for a particular user. e.g
The type instance can also be notified to reload the unit running under a
systemd --user
instance.Note that no notification of
systemd::daemon_reload{'me': user => 'me'}
is currently made at suitable points. Handle this later.This Pull Request (PR) fixes the following issues
Fixes: #381 Fixes: #139 Fixes: #328