diff options
author | varac <varacanero@zeromail.org> | 2017-01-16 13:34:48 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2017-01-16 13:34:48 +0100 |
commit | f3c4059603a6ac19f132b0dc47b95e49d9ddc4ba (patch) | |
tree | d538ad5f49dc31a3bf10029a2c875b729048cdc0 /README.md | |
parent | dc76f6f69e306f865a4a7c3b78b6d5ba694719c5 (diff) | |
parent | a0321364514f52a4c110a15afbdad5109d768fe6 (diff) |
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 51 |
1 files changed, 47 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 @@ -36,3 +58,24 @@ file { '/etc/tmpfiles.d/foo.conf': } ~> Exec['systemd-tmpfiles-create'] ``` + +### service limits + +Manage soft and hard limits on various resources for executed processes. + +```puppet +::systemd::service_limits { 'foo.service': + limits => { + LimitNOFILE => 8192, + LimitNPROC => 16384 + } +} +``` + +Or provide the configuration file yourself. Systemd reloading and restarting of the service are handled by the module. + +```puppet +::systemd::service_limits { 'foo.service': + source => "puppet:///modules/${module_name}/foo.conf", +} +``` |