diff --git a/manifests/daemon_reload.pp b/manifests/daemon_reload.pp new file mode 100644 index 0000000000000000000000000000000000000000..bf9a39d5497e7a273b9b65ed76742a8d48cc5d55 --- /dev/null +++ b/manifests/daemon_reload.pp @@ -0,0 +1,26 @@ +# Copyright © 2021 Thomas Bellman, Linköping, Sweden +# Licensed under the GNU LGPL v3+; see the README file for more information. + + +/* + * Tell systemd to re-read its service configuration files. + * + * If you change any systemd service configuration files, you should + * include and notify this class. Example: + * + * include systemd::daemon_reload + * file { + * '/etc/systemd/system/foo.service.d/bar.conf': + * ensure => absent, + * notify => Class['systemd::daemon_reload']; + * } + */ +class systemd::daemon_reload +{ + exec { + 'systemd::daemon_reload::do-reload': + command => 'systemctl daemon-reload', + path => [ '/bin', '/usr/bin', '/sbin', '/usr/sbin', ], + refreshonly => true; + } +}