diff options
author | Felix Bechstein <felix.bechstein@otto.de> | 2016-01-27 08:18:12 +0100 |
---|---|---|
committer | Felix Bechstein <felix.bechstein@otto.de> | 2016-01-27 11:41:56 +0100 |
commit | 040f1acf02dc379e3fe577d900b96b47a38a714a (patch) | |
tree | 5856d634a5a78b82bd5b89799b8aa621d5e8fa5e /README.md | |
parent | 6d47fd4999fe03eba6fb11c4490dcbb90d937900 (diff) |
Shortcut for creating unit files / tmpfiles
This change allows creating unit files and reloading systemd with just a single resource.
It's fully compatible with the manual behavior.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -5,11 +5,23 @@ ## Overview -This module declares exec resources that you can use when you change systemd units or configuration files. +This module declares exec resources to create global sync points for reloading systemd. -## Examples +## Usage and examples -### systemctl --daemon-reload +There are two ways to use this module. + +### unit files + +Let this module handle file creation and systemd reloading. + +```puppet +::systemd::unit_file { 'foo.service': + source => "puppet:///modules/${module_name}/foo.service", +} +``` + +Or handle file creation yourself and trigger systemd. ```puppet include ::systemd @@ -23,7 +35,17 @@ file { '/usr/lib/systemd/system/foo.service': Exec['systemctl-daemon-reload'] ``` -### systemd-tmpfiles --create +### tmpfiles + +Let this module handle file creation and systemd reloading + +```puppet +::systemd::tmpfile { 'foo.conf': + source => "puppet:///modules/${module_name}/foo.conf", +} +``` + +Or handle file creation yourself and trigger systemd. ```puppet include ::systemd |