diff options
author | Raphaël Pinson <github+aem1eeshi1@raphink.net> | 2016-05-04 09:31:53 +0200 |
---|---|---|
committer | Raphaël Pinson <github+aem1eeshi1@raphink.net> | 2016-05-04 09:31:53 +0200 |
commit | 106be55a2469a6b87ac33e0b2fa8bca40ef2cb4d (patch) | |
tree | 761ebe4a9b31f80088c551e1f0f123cffb11701d /manifests/unit_file.pp | |
parent | 783f6b7a13f21c78d89241b2e5cebe82d80febfb (diff) | |
parent | 040f1acf02dc379e3fe577d900b96b47a38a714a (diff) |
Merge pull request #4 from felixb/feature/unit-files
Shortcut for creating unit files / tmpfiles
Diffstat (limited to 'manifests/unit_file.pp')
-rw-r--r-- | manifests/unit_file.pp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/manifests/unit_file.pp b/manifests/unit_file.pp new file mode 100644 index 0000000..0f659db --- /dev/null +++ b/manifests/unit_file.pp @@ -0,0 +1,20 @@ +# -- Define: systemd::unit_file +# Creates a unit file and reloads systemd +define systemd::unit_file( + $ensure = file, + $path = '/etc/systemd/system', + $content = undef, + $source = undef, +) { + include ::systemd + + file { "${path}/${title}": + ensure => $ensure, + content => $content, + source => $source, + owner => 'root', + group => 'root', + mode => '0444', + notify => Exec['systemctl-daemon-reload'], + } +}
\ No newline at end of file |