summaryrefslogtreecommitdiffstats
path: root/modules/systemd
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-07-11 01:33:40 -0400
committerJesse Luehrs <doy@tozt.net>2020-07-11 01:33:40 -0400
commit5c22a2a78960b4327fccfab5fc483e2761f93486 (patch)
tree08f35fccede7d049196a6ea0004ae6f81c5b46ac /modules/systemd
parent4d2fb213b04a30a2d9e7b65244f4af38b2e183ad (diff)
downloadpuppet-tozt-5c22a2a78960b4327fccfab5fc483e2761f93486.tar.gz
puppet-tozt-5c22a2a78960b4327fccfab5fc483e2761f93486.zip
add helper for systemd overrides
Diffstat (limited to 'modules/systemd')
-rw-r--r--modules/systemd/manifests/override.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/systemd/manifests/override.pp b/modules/systemd/manifests/override.pp
new file mode 100644
index 0000000..976dc08
--- /dev/null
+++ b/modules/systemd/manifests/override.pp
@@ -0,0 +1,13 @@
+define systemd::override($source = undef, $content = undef) {
+ include systemd
+
+ file {
+ "/etc/systemd/system/${name}.service.d":
+ ensure => directory;
+ "/etc/systemd/system/${name}.service.d/override.conf":
+ source => $source,
+ content => $content,
+ notify => Exec['/usr/bin/systemctl daemon-reload'],
+ require => File["/etc/systemd/system/${name}.service.d"];
+ }
+}