Systemd
Overview
This module declares exec resources to create global sync points for reloading systemd.
It also allows you to manage journald settings.
Usage and examples
You can manage journald settings through setting the journald_settings
parameter:
systemd::journald_settings:
Storage: auto
MaxRetentionSec: 5day
Furthermore this module provides two ways to manage further systemd resources:
unit files
Let this module handle file creation and systemd reloading.
::systemd::unit_file { 'foo.service':
source => "puppet:///modules/${module_name}/foo.service",
}
Or handle file creation yourself and trigger systemd.
include ::systemd
file { '/usr/lib/systemd/system/foo.service':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///modules/${module_name}/foo.service",
} ~>
Exec['systemctl-daemon-reload']
tmpfiles
Let this module handle file creation and systemd reloading
::systemd::tmpfile { 'foo.conf':
source => "puppet:///modules/${module_name}/foo.conf",
}
Or handle file creation yourself and trigger systemd.
include ::systemd
file { '/etc/tmpfiles.d/foo.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///modules/${module_name}/foo.conf",
} ~>
Exec['systemd-tmpfiles-create']
service limits
Manage soft and hard limits on various resources for executed processes.
::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.
::systemd::service_limits { 'foo.service':
source => "puppet:///modules/${module_name}/foo.conf",
}