systemd
: This module allows triggering systemd commands once for all modulessystemd::tmpfiles
: Update the systemd temp files
systemd::coredump
: This class manages the systemd-coredump configuration.systemd::install
: Install any systemd sub packagessystemd::journal_remote
: This class manages and configures journal-remote.systemd::journal_upload
: This class manages and configures journal-upload.systemd::journald
: This class manages and configures journald.systemd::logind
: This class manages systemd's login manager configuration.systemd::machine_info
: This class manages systemd's machine-info file (hostnamectl)systemd::modules_loads
: Activate the modules contained in modules-loads.dsystemd::networkd
: This class provides an abstract way to trigger systemd-networkdsystemd::oomd
: This class manages and configures oomd.systemd::resolved
: This class provides an abstract way to trigger resolved.systemd::service_manager
: This class provides a solution to manage system and/or user service manager settingssystemd::timedatectl
: This class provides an abstract way to set elements with timedatectlsystemd::timesyncd
: This class provides an abstract way to trigger systemd-timesyncdsystemd::udevd
: This class manages systemd's udev config
systemd::daemon_reload
: Run systemctl daemon-reloadsystemd::dropin_file
: Creates a drop-in file for a systemd unitsystemd::manage_dropin
: Creates a drop-in file for a systemd unit from a templatesystemd::manage_unit
: Generate unit file from templatesystemd::modules_load
: Creates a modules-load.d drop filesystemd::network
: Creates network config for systemd-networkdsystemd::service_limits
: Deprecated - Adds a set of custom limits to the servicesystemd::timer
: Create a timer and optionally a service unit to execute with the timer unitsystemd::timer_wrapper
: Helper to define timer and accompanying services for a given task (cron like interface).systemd::tmpfile
: Creates a systemd tmpfilesystemd::udev::rule
: Adds a custom udev rulesystemd::unit_file
: Creates a systemd unit filesystemd::user_service
: Manage a user service running under systemd --user
loginctl_user
: An arbitrary name used as the identity of the resource.
systemd::escape
: Escape strings as systemd-escape does.systemd::systemd_escape
: Escape strings by call thesystemd-escape
command in the background.
Systemd::Boolean
: Defines systemd boolean type representationSystemd::Boolean::False
: Defines systemd boolean "false" type representationSystemd::Boolean::True
: Defines systemd boolean "true" type representationSystemd::Capabilities
: Defines allowed capabilitiesSystemd::CoredumpSettings
: Configurations for coredump.confSystemd::Dropin
: custom datatype that validates filenames/paths for valid systemd dropin filesSystemd::JournalRemoteSettings
: matches Systemd journal remote config StructSystemd::JournalUploadSettings
: matches Systemd journal upload config StructSystemd::JournaldSettings
: Matches Systemd journald config StructSystemd::JournaldSettings::Ensure
: defines allowed ensure states for systemd-journald settingsSystemd::LogLevel
: Defines allowed log levelsSystemd::LogindSettings
: Matches Systemd Login Manager StructSystemd::LogindSettings::Ensure
: defines allowed ensure states for systemd-logind settingsSystemd::MachineInfoSettings
: Matches Systemd machine-info (hostnamectl) file StructSystemd::OomdSettings
: Configurations for oomd.confSystemd::Output
: Defines allowed output valuesSystemd::ServiceLimits
: Deprecated - Matches Systemd Service Limit StructSystemd::ServiceManagerSettings
: Matches Systemd system.conf/user.conf settingsSystemd::SettingEnsure
: Defines allowed ensure states for an ini_settingSystemd::Timespan
: Defines a timespan typeSystemd::Unit
: custom datatype that validates different filenames for systemd units and unit templatesSystemd::Unit::Amount
: Systemd definition of amount, often bytes or united bytesSystemd::Unit::AmountOrPercent
: Systemd definition of amount, often bytes or united bytesSystemd::Unit::Install
: Possible keys for the [Install] section of a unit fileSystemd::Unit::Mount
: Possible keys for the [Mount] section of a unit fileSystemd::Unit::Path
: Possible keys for the [Path] section of a unit fileSystemd::Unit::Percent
: Systemd definition of a percentageSystemd::Unit::Service
: Possible keys for the [Service] section of a unit fileSystemd::Unit::Service::Exec
: Possible strings for ExecStart, ExecStartPrep, ...Systemd::Unit::Slice
: Possible keys for the [Slice] section of a unit fileSystemd::Unit::Socket
: Possible keys for the [Socket] section of a unit fileSystemd::Unit::Swap
: Possible keys for the [Swap] section of a unit fileSystemd::Unit::Timer
: Possible keys for the [Timer] section of a unit fileSystemd::Unit::Timespan
: Timer specification for systemd time spans, e.g. timers.Systemd::Unit::Unit
: Possible keys for the [Unit] section of a unit file
systemctl_show
: Get systemctl show output of a unit
This module allows triggering systemd commands once for all modules
The following parameters are available in the systemd
class:
default_target
service_limits
networks
timers
tmpfiles
unit_files
manage_resolved
resolved_ensure
resolved_package
manage_nspawn
nspawn_package
dns
fallback_dns
domains
llmnr
multicast_dns
dnssec
dnsovertls
cache
dns_stub_listener
dns_stub_listener_extra
manage_resolv_conf
use_stub_resolver
manage_networkd
networkd_ensure
networkd_package
manage_timesyncd
timesyncd_ensure
timesyncd_package
ntp_server
fallback_ntp_server
timezone
set_local_rtc
manage_journald
journald_settings
manage_journal_upload
journal_upload_settings
manage_journal_remote
journal_remote_settings
manage_udevd
udev_log
udev_children_max
udev_exec_delay
udev_event_timeout
udev_resolve_names
udev_timeout_signal
udev_rules
udev_reload
machine_info_settings
manage_logind
logind_settings
loginctl_users
dropin_files
manage_units
manage_dropins
manage_all_network_files
network_path
manage_accounting
accounting
purge_dropin_dirs
manage_coredump
coredump_settings
coredump_backtrace
manage_oomd
oomd_package
oomd_ensure
oomd_settings
udev_purge_rules
manage_system_conf
system_settings
manage_user_conf
user_settings
Data type: Optional[Pattern['^.+\.target$']]
The default systemd boot target, unmanaged if set to undef.
Default value: undef
Data type: Stdlib::CreateResources
Deprecated, use dropin_files - Hash of systemd::service_limits
resources
Default value: {}
Data type: Stdlib::CreateResources
Hash of systemd::network
resources
Default value: {}
Data type: Stdlib::CreateResources
Hash of systemd::timer
resources
Default value: {}
Data type: Stdlib::CreateResources
Hash of systemd::tmpfile
resources
Default value: {}
Data type: Stdlib::CreateResources
Hash of systemd::unit_file
resources
Default value: {}
Data type: Boolean
Manage the systemd resolver
Default value: false
Data type: Enum['stopped','running']
The state that the resolved
service should be in. When migrating from 'running' to
'stopped' an attempt will be made to restore a working /etc/resolv.conf
using
/run/systemd/resolve/resolv.conf
.
Default value: 'running'
Data type: Optional[Enum['systemd-resolved']]
The name of a systemd sub package needed for systemd-resolved if one needs to be installed.
Default value: undef
Data type: Boolean
Manage the systemd-nspawn@service and machinectl subsystem.
Default value: false
Data type: Optional[Enum['systemd-container']]
The name of a systemd sub package needed for the nspawn tools machinectl and systemd-nspawn if one needs to be installed.
Default value: undef
Data type: Optional[Variant[Array[String],String]]
A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers. DNS requests are sent to one of the listed DNS servers in parallel to suitable per-link DNS servers acquired from systemd-networkd.service(8) or set at runtime by external applications. requires puppetlabs-inifile
Default value: undef
Data type: Optional[Variant[Array[String],String]]
A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS servers. Any per-link DNS servers obtained from systemd-networkd take precedence over this setting. requires puppetlabs-inifile
Default value: undef
Data type: Optional[Variant[Array[String],String]]
A space-separated list of domains host names or IP addresses to be used systemd-resolved take precedence over this setting.
Default value: undef
Data type: Optional[Variant[Boolean,Enum['resolve']]]
Takes a boolean argument or "resolve".
Default value: undef
Data type: Optional[Variant[Boolean,Enum['resolve']]]
Takes a boolean argument or "resolve".
Default value: undef
Data type: Optional[Variant[Boolean,Enum['allow-downgrade']]]
Takes a boolean argument or "allow-downgrade".
Default value: undef
Data type: Variant[Boolean,Enum['yes', 'opportunistic', 'no']]
Takes a boolean argument or one of "yes", "opportunistic" or "no". "true" corresponds to "opportunistic" and "false" (default) to "no".
Default value: false
Data type: Optional[Variant[Boolean,Enum['no-negative']]]
Takes a boolean argument or "no-negative". If left undef
the cache setting will not be modified.
Default value: undef
Data type: Optional[Variant[Boolean,Enum['udp','tcp','absent']]]
Takes a boolean argument or one of "udp" and "tcp".
Setting it to 'absent'
will remove DNSStubListener
existing entries from the configuration file
Default value: undef
Data type: Optional[Variant[Array[String[1]],Enum['absent']]]
Additional addresses for the DNS stub listener to listen on
Setting it to 'absent'
will remove DNSStubListenerExtra
existing entries from the configuration file
Default value: undef
Data type: Boolean
For when manage_resolved
is true
should the file /etc/resolv.conf
be managed.
Default value: true
Data type: Boolean
Takes a boolean argument. When "false" (default) it uses /run/systemd/resolve/resolv.conf
as /etc/resolv.conf. When "true", it uses /run/systemd/resolve/stub-resolv.conf
When resolved_ensure
is stopped
this parameter is ignored.
Default value: false
Data type: Boolean
Manage the systemd network daemon
Default value: false
Data type: Enum['stopped','running']
The state that the networkd
service should be in
Default value: 'running'
Data type: Optional[String[1]]
Name of the package required for systemd-networkd, if any
Default value: undef
Data type: Boolean
Manage the systemd timesyncd daemon
Default value: false
Data type: Enum['stopped','running']
The state that the timesyncd
service should be in
Default value: 'running'
Data type: Optional[String[1]]
Name of the package required for systemd-timesyncd, if any
Default value: undef
Data type: Optional[Variant[Array,String]]
comma separated list of ntp servers, will be combined with interface specific addresses from systemd-networkd. requires puppetlabs-inifile
Default value: undef
Data type: Optional[Variant[Array,String]]
A space-separated list of NTP server host names or IP addresses to be used as the fallback NTP servers. Any per-interface NTP servers obtained from systemd-networkd take precedence over this setting. requires puppetlabs-inifile
Default value: undef
Data type: Optional[String[1]]
Set the system time zone to the specified value. Available timezones can be listed with list-timezones. If the RTC is configured to be in the local time, this will also update the RTC time. This call will alter the /etc/localtime symlink.
Default value: undef
Data type: Optional[Boolean]
Takes a boolean argument. If "false", the system is configured to maintain the RTC in universal time. If "true", it will maintain the RTC in local time instead. Note that maintaining the RTC in the local timezone is not fully supported and will create various problems with time zone changes and daylight saving adjustments. If at all possible, keep the RTC in UTC mode.
Default value: undef
Data type: Boolean
Manage the systemd journald
Default value: true
Data type: Systemd::JournaldSettings
Config Hash that is used to configure settings in journald.conf
Default value: {}
Data type: Boolean
Manage the systemd journal upload to a remote server
Default value: false
Data type: Systemd::JournalUploadSettings
Config Hash that is used to configure settings in journal-upload.conf
Default value: {}
Data type: Boolean
Manage the systemd journal remote server used to upload journals
Default value: false
Data type: Systemd::JournalRemoteSettings
Config Hash that is used to configure settings in journal-remote.conf
Default value: {}
Data type: Boolean
Manage the systemd udev daemon
Default value: false
Data type: Optional[Variant[Integer,String]]
The value of /etc/udev/udev.conf udev_log
Default value: undef
Data type: Optional[Integer]
The value of /etc/udev/udev.conf children_max
Default value: undef
Data type: Optional[Integer]
The value of /etc/udev/udev.conf exec_delay
Default value: undef
Data type: Optional[Integer]
The value of /etc/udev/udev.conf event_timeout
Default value: undef
Data type: Optional[Enum['early', 'late', 'never']]
The value of /etc/udev/udev.conf resolve_names
Default value: undef
Data type: Optional[Variant[Integer,String]]
The value of /etc/udev/udev.conf timeout_signal
Default value: undef
Data type: Stdlib::CreateResources
Config Hash that is used to generate instances of our
udev::rule
define.
Default value: {}
Data type: Boolean
Whether udev rules should be automatically reloaded upon change.
Default value: false
Data type: Systemd::MachineInfoSettings
Settings to place into /etc/machine-info (hostnamectl)
Default value: {}
Data type: Boolean
Manage the systemd logind
Default value: false
Data type: Systemd::LogindSettings
Config Hash that is used to configure settings in logind.conf
Default value: {}
Data type: Stdlib::CreateResources
Config Hash that is used to generate instances of our type
loginctl_user
.
Default value: {}
Data type: Stdlib::CreateResources
Configure dropin files via hiera and systemd::dropin_file
with factory pattern
Default value: {}
Data type: Stdlib::CreateResources
Configure units via hiera and systemd::manage_unit
with factory pattern
Default value: {}
Data type: Stdlib::CreateResources
Configure dropin files via hiera and systemd::manage_dropin
with factory pattern
Default value: {}
Data type: Boolean
Default value: false
Data type: Stdlib::Absolutepath
where all networkd files are placed in
Default value: '/etc/systemd/network'
Data type: Boolean
When enabled, the different accounting options (network traffic, IO, CPU util...) are enabled for units.
Default value: false
Data type: Hash[String,String]
Hash of the different accounting options. This highly depends on the used systemd version. The module provides sane defaults per operating system using Hiera.
Default value: {}
Data type: Boolean
When enabled, unused directories for dropin files will be purged
Default value: true
Data type: Boolean
Should systemd-coredump configuration be managed
Default value: false
Data type: Systemd::CoredumpSettings
Hash of systemd-coredump configurations for coredump.conf
Default value: {}
Data type: Boolean
Add --backtrace to systemd-coredump call systemd-coredump@.service unit
Default value: false
Data type: Boolean
Should systemd-oomd configuration be managed
Default value: false
Data type: Optional[String[1]]
Name of the package required for systemd-oomd, if any
Default value: undef
Data type: Enum['stopped','running']
The state that the oomd
service should be in
Default value: 'running'
Data type: Systemd::OomdSettings
Hash of systemd-oomd configurations for oomd.conf
Default value: {}
Data type: Boolean
Toggle if unmanaged files in /etc/udev/rules.d should be purged if manage_udevd is enabled
Default value: false
Data type: Boolean
Should system service manager configurations be managed
Default value: false
Data type: Systemd::ServiceManagerSettings
Config Hash that is used to configure settings in system.conf NOTE: It's currently impossible to have multiple entries of the same key in the settings.
Default value: {}
Data type: Boolean
Should user service manager configurations be managed
Default value: false
Data type: Systemd::ServiceManagerSettings
Config Hash that is used to configure settings in user.conf NOTE: It's currently impossible to have multiple entries of the same key in the settings.
Default value: {}
Update the systemd temp files
- See also
- systemd-tmpfiles(8)
The following parameters are available in the systemd::tmpfiles
class:
Data type: Array[Enum['create','clean','remove']]
The operations to perform on the systemd tempfiles
- All operations may be combined but you'll probably only ever want to
use
create
Default value: ['create']
Run systemctl daemon-reload
notify{ 'fake event to notify from':
notify => Systemd::Daemon_reload['special']
}
systemd::daemon_reload{ 'special': }
notify{ 'fake event to notify from':
notify => Systemd::Daemon_reload['steve_user']
}
systemd::daemon_reload{ 'steve_user':
user => 'steve',
}
The following parameters are available in the systemd::daemon_reload
defined type:
A globally unique name for the resource
Data type: Boolean
Enable the reload exec
- Added in case users want to disable the reload globally using a resource collector
Default value: true
Data type: Optional[String[1]]
Specify user name of systemd --user
to reload. This not supported below Redhat 9,
Ubuntu 22.04 or Debian 12.
Default value: undef
Creates a drop-in file for a systemd unit
- See also
- systemd.unit(5)
The following parameters are available in the systemd::dropin_file
defined type:
unit
filename
ensure
path
selinux_ignore_defaults
content
source
target
owner
group
mode
show_diff
notify_service
daemon_reload
Data type: Systemd::Unit
The target unit file to create
Data type: Systemd::Dropin
The filename of the drop in. The full path is determined using the path, unit and this filename.
Default value: $name
Data type: Enum['present', 'absent', 'file']
the state of this dropin file
Default value: 'present'
Data type: Stdlib::Absolutepath
The main systemd configuration path
Default value: '/etc/systemd/system'
Data type: Boolean
If Puppet should ignore the default SELinux labels.
Default value: false
Data type: Optional[Variant[String,Sensitive[String]]]
The full content of the unit file (Mutually exclusive with $source
)
Default value: undef
Data type: Optional[String]
The File
resource compatible source
Mutually exclusive with $content
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
If set, will force the file to be a symlink to the given target (Mutually exclusive with both $source
and $content
Default value: undef
Data type: String
The owner to set on the dropin file
Default value: 'root'
Data type: String
The group to set on the dropin file
Default value: 'root'
Data type: String
The mode to set on the dropin file
Default value: '0444'
Data type: Boolean
Whether to show the diff when updating dropin file
Default value: true
Data type: Boolean
Notify a service for the unit, if it exists
Default value: true
Data type: Boolean
Call systemd::daemon_reload
Default value: true
Creates a drop-in file for a systemd unit from a template
- See also
- systemd.unit(5)
systemd::manage_dropin { 'myconf.conf':
ensure => present,
unit => 'myservice.service',
service_entry => {
'Type' => 'oneshot',
'ExecStart' => ['', '/usr/bin/doit.sh'],
},
}
systemd::manage_dropin { 'triggerlimit.conf':
ensure => present,
unit => 'passwd.path',
path_entry => {
'TriggerLimitBurst' => 100,
},
}
systemd::manage_dropin { 'corelimit.conf':
ensure => present,
unit => 'rsyslog.conf',
path_entry => {
'LimitCORE' => 'infinity',
},
}
systemd::manage_dropin { 'maxloglevel.conf':
ensure => present,
unit => 'chatty.service',
service_entry => {
'LogLevelMax' => 'warning',
}
}
systemd::manage_dropin { 'user-aklog.conf':
unit => 'user@.service',
unit_entry => {
'After' => 'user-aklog@%i.service',
'Requires' => 'user-aklog@%i.service'
}
}
systemd::manage_dropin { 'userlimits.conf':
unit => 'user-.slice',
slice_entry => {
MemoryMax => '10G',
MemoryAccounting => true,
}
}
systemd::manage_dropin { 'devicelimits.conf':
unit => 'special.service',
service_entry => {
'IOReadIOPSMax' => [
['/dev/afs',100],
['/dev/gluster','1000K'],
],
},
}
The following parameters are available in the systemd::manage_dropin
defined type:
unit
filename
ensure
path
selinux_ignore_defaults
owner
group
mode
show_diff
notify_service
daemon_reload
unit_entry
slice_entry
service_entry
install_entry
timer_entry
path_entry
socket_entry
mount_entry
swap_entry
Data type: Systemd::Unit
The unit to create a dropfile for
Data type: Systemd::Dropin
The target unit file to create. The filename of the drop in. The full path is determined using the path, unit and this filename.
Default value: $name
Data type: Enum['present', 'absent']
The state of this dropin file
Default value: 'present'
Data type: Stdlib::Absolutepath
The main systemd configuration path
Default value: '/etc/systemd/system'
Data type: Boolean
If Puppet should ignore the default SELinux labels
Default value: false
Data type: String
The owner to set on the dropin file
Default value: 'root'
Data type: String
The group to set on the dropin file
Default value: 'root'
Data type: Stdlib::Filemode
The mode to set on the dropin file
Default value: '0444'
Data type: Boolean
Whether to show the diff when updating dropin file
Default value: true
Data type: Boolean
Notify a service for the unit, if it exists
Default value: false
Data type: Boolean
Call systemd::daemon_reload
Default value: true
Data type: Optional[Systemd::Unit::Unit]
key value pairs for [Unit] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Slice]
key value pairs for [Slice] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Service]
key value pairs for [Service] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Install]
key value pairs for [Install] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Timer]
key value pairs for [Timer] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Path]
key value pairs for [Path] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Socket]
key value pairs for the [Socket] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Mount]
key value pairs for the [Mount] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Swap]
key value pairs for the [Swap] section of the unit file
Default value: undef
Generate unit file from template
- See also
- systemd.unit(5)
systemd::manage_unit { 'myrunner.service':
unit_entry => {
'Description' => 'My great service',
},
service_entry => {
'Type' => 'oneshot',
'ExecStart' => '/usr/bin/doit.sh',
},
install_entry => {
'WantedBy' => 'multi-user.target',
},
}
systemd::manage_unit { 'passwd-mon.path':
ensure => present,
unit_entry => {
'Description' => 'Monitor the passwd file',
},
path_entry => {
'PathModified' => '/etc/passwd',
'Unit' => 'passwd-mon.service',
},
install_entry => {
'WantedBy' => 'multi-user.target',
},
}
systemd::manage_unit {'arcd.socket':
ensure => 'present',
unit_entry => {
'Description' => 'arcd.service',
},
socket_entry => {
'ListenStream' => 4241,
'Accept' => true,
'BindIPv6Only' => 'both',
},
install_entry => {
'WantedBy' => 'sockets.target',
},
}
systemd::manage_unit{'arcd@.service':
ensure => 'present',
enable => true,
active => true,
unit_entry => {
'Description' => 'arc sever for %i',
},
service_entry => {
'Type' => 'simple',
'ExecStart' => /usr/sbin/arcd /usr/libexec/arcd/arcd.pl,
'StandardInput' => 'socket',
},
}
systemd::manage_unit { 'var-lib-sss-db.mount':
ensure => present,
unit_entry => {
'Description' => 'Mount sss tmpfs db',
},
mount_entry => {
'What' => 'tmpfs',
'Where' => '/var/lib/sss/db',
'Type' => 'tmpfs',
'Options' => 'size=300M,mode=0700,uid=sssd,gid=sssd,rootcontext=system_u:object_r:sssd_var_lib_t:s0',
},
}
systemd::manage_dropin { 'tmpfs-db.conf':
ensure => present,
unit => 'sssd.service',
unit_entry => {
'RequiresMountsFor' => '/var/lib/sss/db',
},
}
systemd::manage_unit{'swapfile.swap':
ensure => present,
enable => true,
active => true,
unit_entry => {
'Description' => 'Mount /swapfile as a swap file',
'After' => 'mkswap.service',
'Requires' => 'mkswap.service',
},
swap_entry => {
'What' => '/swapfile',
},
install_entry => {
'WantedBy' => 'multi-user.target',
},
require => Systemd::Manage_unit['mkswap.service'],
}
systemd::manage_unit{'mkswap.service':
ensure => present,
unit_entry => {
'Description' => 'Format a swapfile at /swapfile',
'ConditionPathExists' => '!/swapfile',
},
service_entry => {
'Type' => 'oneshot',
'UMask' => '0177',
'ExecStart' => [
'/usr/bin/dd if=/dev/zero of=/swapfile bs=1024 count=1000',
'/usr/sbin/mkswap /swapfile',
],
},
}
systemd::manage_unit { 'my.service':
ensure => 'absent',
}
The following parameters are available in the systemd::manage_unit
defined type:
name
ensure
path
owner
group
mode
show_diff
enable
active
restart
selinux_ignore_defaults
service_parameters
daemon_reload
service_restart
unit_entry
slice_entry
service_entry
install_entry
timer_entry
path_entry
socket_entry
mount_entry
swap_entry
Data type: Pattern['^[^/]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$']
The target unit file to create
Data type: Enum['present', 'absent']
The state of the unit file to ensure
Default value: 'present'
Data type: Stdlib::Absolutepath
The main systemd configuration path
Default value: '/etc/systemd/system'
Data type: String
The owner to set on the unit file
Default value: 'root'
Data type: String
The group to set on the unit file
Default value: 'root'
Data type: Stdlib::Filemode
The mode to set on the unit file
Default value: '0444'
Data type: Boolean
Whether to show the diff when updating unit file
Default value: true
Data type: Optional[Variant[Boolean, Enum['mask']]]
If set, manage the unit enablement status
Default value: undef
Data type: Optional[Boolean]
If set, will manage the state of the unit
Default value: undef
Data type: Optional[String]
Specify a restart command manually. If left unspecified, a standard Puppet service restart happens
Default value: undef
Data type: Boolean
maps to the same param on the file resource for the unit. false in the module because it's false in the file resource type
Default value: false
Data type: Hash[String[1], Any]
hash that will be passed with the splat operator to the service resource
Default value: {}
Data type: Boolean
call systemd::daemon-reload
to ensure that the modified unit file is loaded
Default value: true
Data type: Boolean
restart (notify) the service when unit file changed
Default value: true
Data type: Optional[Systemd::Unit::Unit]
key value pairs for [Unit] section of the unit file.
Default value: undef
Data type: Optional[Systemd::Unit::Slice]
key value pairs for [Slice] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Service]
key value pairs for [Service] section of the unit file.
Default value: undef
Data type: Optional[Systemd::Unit::Install]
key value pairs for [Install] section of the unit file.
Default value: undef
Data type: Optional[Systemd::Unit::Timer]
key value pairs for [Timer] section of the unit file
Default value: undef
Data type: Optional[Systemd::Unit::Path]
key value pairs for [Path] section of the unit file.
Default value: undef
Data type: Optional[Systemd::Unit::Socket]
kev value paors for [Socket] section of the unit file.
Default value: undef
Data type: Optional[Systemd::Unit::Mount]
kev value pairs for [Mount] section of the unit file.
Default value: undef
Data type: Optional[Systemd::Unit::Swap]
kev value pairs for [Swap] section of the unit file.
Default value: undef
Creates a modules-load.d drop file
- See also
- modules-load.d(5)
systemd::modules_load { 'impi.conf':
content => "ipmi\n",
}
systemd::modules_load { 'myservice.conf':
content => "# Cancel system version of the file\n",
}
The following parameters are available in the systemd::modules_load
defined type:
Data type: Systemd::Dropin
The name of the modules-load.d file to create
Default value: $name
Data type: Enum['present', 'absent', 'file']
Whether to drop a file or remove it
Default value: 'file'
Data type: Stdlib::Absolutepath
The path to the main systemd modules-load.d directory
Default value: '/etc/modules-load.d'
Data type: Optional[String[1]]
The literal content to write to the file
- Mutually exclusive with
$source
Default value: undef
Data type: Optional[String[1]]
A File
resource compatible source
- Mutually exclusive with
$content
Default value: undef
Creates network config for systemd-networkd
The following parameters are available in the systemd::network
defined type:
Data type: Enum['file', 'absent']
configure if the file should be configured or deleted
Default value: file
Data type: Stdlib::Absolutepath
directory where the network configs are stored
Default value: '/etc/systemd/network'
Data type: Optional[String]
the content of the file
Default value: undef
Data type: Optional[String]
a path to a file that's used as source
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
optional absolute path in case the file should be stored somewhere else
Default value: undef
Data type: String
the user who owns the file
Default value: 'root'
Data type: String
the group that owns the file
Default value: 'root'
Data type: String
the mode of the file
Default value: '0444'
Data type: Boolean
whether the file diff should be shown on modifications
Default value: true
Data type: Boolean
whether systemd-networkd should be restarted on changes, defaults to true. $systemd::manage_networkd
needs to be true as well
Default value: true
Deprecated - Adds a set of custom limits to the service
- See also
- systemd.exec(5)
The following parameters are available in the systemd::service_limits
defined type:
Data type: Pattern['^.+\.(service|socket|mount|swap)$']
The name of the service that you will be modifying
Data type: Enum['present', 'absent', 'file']
Whether to drop a file or remove it
Default value: 'present'
Data type: Stdlib::Absolutepath
The path to the main systemd settings directory
Default value: '/etc/systemd/system'
Data type: Boolean
If Puppet should ignore the default SELinux labels.
Default value: false
Data type: Optional[Systemd::ServiceLimits]
A Hash of service limits matching the settings in systemd.exec(5)
- Mutually exclusive with
$source
Default value: undef
Data type: Optional[String]
A File
resource compatible source
- Mutually exclusive with
$limits
Default value: undef
Data type: Boolean
Unused parameter for compatibility with older versions. Will fail if true is passed in.
Default value: false
Create a timer and optionally a service unit to execute with the timer unit
- See also
- https://www.freedesktop.org/software/systemd/man/systemd.timer.html
- systemd.timer(5)
- https://www.freedesktop.org/software/systemd/man/systemd.timer.html
The following parameters are available in the systemd::timer
defined type:
name
path
timer_content
timer_source
service_content
service_source
owner
group
mode
show_diff
service_unit
active
enable
ensure
daemon_reload
Data type: Pattern['^.+\.timer$]
The target of the timer unit to create
Data type: Stdlib::Absolutepath
The main systemd configuration path
Default value: '/etc/systemd/system'
Data type: Optional[String[1]]
The full content of the timer unit file
- Mutually exclusive with
$timer_source
Default value: undef
Data type: Optional[String[1]]
The File
resource compatible source
- Mutually exclusive with
$timer_content
Default value: undef
Data type: Optional[String[1]]
The full content of the service unit file
- Mutually exclusive with
$service_source
Default value: undef
Data type: Optional[String[1]]
The File
resource compatible source
- Mutually exclusive with
$service_content
Default value: undef
Data type: String[1]
The owner to set on the dropin file
Default value: 'root'
Data type: String[1]
The group to set on the dropin file
Default value: 'root'
Data type: Stdlib::Filemode
The mode to set on the dropin file
Default value: '0444'
Data type: Boolean
Whether to show the diff when updating dropin file
Default value: true
Data type: Optional[Systemd::Unit]
If set then the service_unit will have this name. If not set the service unit has the same name as the timer unit with s/.timer/.service/
Default value: undef
Data type: Optional[Boolean]
If set to true or false the timer service will be maintained. If true the timer service will be running and enabled, if false it will explicitly stopped and disabled.
Default value: undef
Data type: Optional[Variant[Boolean, Enum['mask']]]
If set, will manage the state of the unit.
Default value: undef
Data type: Enum['present', 'absent', 'file']
Defines the desired state of the timer
Default value: 'present'
Data type: Boolean
Call systemd::daemon_reload
Default value: true
Helper to define timer and accompanying services for a given task (cron like interface).
systemd::timer_wrapper { 'my_timer':
ensure => 'present',
command => '/usr/bin/echo "Hello World"',
on_calendar => '*:0/5',
}
systemd::timer_wrapper { 'my_timer':
ensure => 'present',
command => '/usr/bin/echo "Hello World"',
on_calendar => '*:0/5',
service_overrides => { 'Group' => 'nobody' },
timer_overrides => { 'OnBootSec' => '10' },
}
systemd::timer_wrapper { 'my_timer':
ensure => 'present',
command => '/usr/bin/echo "Hello World"',
on_calendar => '*:0/5',
service_unit_overrides => { 'Wants' => 'network-online.target' },
timer_unit_overrides => { 'Description' => 'Very special timer' },
}
The following parameters are available in the systemd::timer_wrapper
defined type:
ensure
command
user
on_active_sec
on_boot_sec
on_start_up_sec
on_unit_active_sec
on_unit_inactive_sec
on_calendar
service_overrides
timer_overrides
service_unit_overrides
timer_unit_overrides
Data type: Enum['present', 'absent']
whether the timer and service should be present or absent
Data type: Optional[Systemd::Unit::Service::Exec]
the command for the systemd servie to execute
Default value: undef
Data type: Optional[String[1]]
the user to run the command as
Default value: undef
Data type: Optional[Systemd::Unit::Timespan]
run service relative to the time when the timer was activated
Default value: undef
Data type: Optional[Systemd::Unit::Timespan]
run service relative to when the machine was booted
Default value: undef
Data type: Optional[Systemd::Unit::Timespan]
run service relative to when the service manager was started
Default value: undef
Data type: Optional[Systemd::Unit::Timespan]
run service relative to when the unit was last activated
Default value: undef
Data type: Optional[Systemd::Unit::Timespan]
run service relative to when the unit was last deactivated
Default value: undef
Data type: Optional[Systemd::Unit::Timespan]
the calendar event expressions time to run the service
Default value: undef
Data type: Systemd::Unit::Service
override for the[Service]
section of the service
Default value: {}
Data type: Systemd::Unit::Timer
override for the[Timer]
section of the timer
Default value: {}
Data type: Systemd::Unit::Unit
override for the[Unit]
section of the service
Default value: {}
Data type: Systemd::Unit::Unit
override for the [Unit]
section of the timer
Default value: {}
Creates a systemd tmpfile
- See also
- systemd-tmpfiles(8)
The following parameters are available in the systemd::tmpfile
defined type:
Data type: Systemd::Dropin
The name of the tmpfile to create
Default value: $name
Data type: Enum['present', 'absent', 'file']
Whether to drop a file or remove it
Default value: 'file'
Data type: Stdlib::Absolutepath
The path to the main systemd tmpfiles directory
Default value: '/etc/tmpfiles.d'
Data type: Optional[String]
The literal content to write to the file
- Mutually exclusive with
$source
Default value: undef
Data type: Optional[String]
A File
resource compatible source
- Mutually exclusive with
$limits
Default value: undef
Adds a custom udev rule
- See also
- udev(7)
The following parameters are available in the systemd::udev::rule
defined type:
Data type: Pattern['^.+\.rules$']
The name of the udev rules to create
Data type: Enum['present', 'absent', 'file']
Whether to drop a file or remove it
Default value: 'file'
Data type: Stdlib::Absolutepath
The path to the main systemd settings directory
Default value: '/etc/udev/rules.d'
Data type: Boolean
If Puppet should ignore the default SELinux labels.
Default value: false
Data type: Variant[Array[String[1]], String[1]]
List of services to notify when this rule is updated
Default value: []
Data type: Array
The literal udev rules you want to deploy
Default value: []
Creates a systemd unit file
- See also
- systemd.unit(5)
systemd::unit_file { 'foo.service':
content => file("${module_name}/foo.service"),
enable => true,
active => true,
}
The following parameters are available in the systemd::unit_file
defined type:
name
ensure
path
content
source
target
owner
group
mode
show_diff
enable
active
restart
selinux_ignore_defaults
service_parameters
daemon_reload
service_restart
Data type: Pattern['^[^/]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$']
The target unit file to create
Data type: Enum['present', 'absent']
The state of the unit file to ensure
Default value: 'present'
Data type: Stdlib::Absolutepath
The main systemd configuration path
Default value: '/etc/systemd/system'
Data type: Optional[Variant[String, Sensitive[String], Deferred]]
The full content of the unit file
- Mutually exclusive with
$source
Default value: undef
Data type: Optional[String]
The File
resource compatible source
- Mutually exclusive with
$content
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
If set, will force the file to be a symlink to the given target
- Mutually exclusive with both
$source
and$content
Default value: undef
Data type: String
The owner to set on the unit file
Default value: 'root'
Data type: String
The group to set on the unit file
Default value: 'root'
Data type: String
The mode to set on the unit file
Default value: '0444'
Data type: Boolean
Whether to show the diff when updating unit file
Default value: true
Data type: Optional[Variant[Boolean, Enum['mask']]]
If set, will manage the unit enablement status.
Default value: undef
Data type: Optional[Boolean]
If set, will manage the state of the unit.
Default value: undef
Data type: Optional[String]
Specify a restart command manually. If left unspecified, a standard Puppet service restart happens.
Default value: undef
Data type: Boolean
maps to the same param on the file resource for the unit. false in the module because it's false in the file resource type
Default value: false
Data type: Hash[String[1], Any]
hash that will be passed with the splat operator to the service resource
Default value: {}
Data type: Boolean
call systemd::daemon-reload
to ensure that the modified unit file is loaded
Default value: true
Data type: Boolean
restart (notify) the service when unit file changed
Default value: true
Manage a user service running under systemd --user
systemd::user_service { 'systemd-tmpfiles-clean.timer':
enable => true,
global => true,
}
systemd::user_service { 'podman-auto-update.timer':
ensure => true,
enable => true,
user => 'steve',
}
file{ '/home/steve/.config/systemd/user/podman-auto-update.timer':
ensure => file,
content => ...,
notify => Systemd::User_service['steve-podman-auto-update.timer']
}
systemd::user_service { 'steve-podman-auto-update.timer':
ensure => true,
enable => true,
unit => 'podman-auto-update.timer',
user => 'steve',
}
@param unit Unit name to work on
@param ensure Should the unit be started or stopped. Can only be true if user is specified.
@param enable Should the unit be enabled or disabled
@param user User name of user whose unit should be acted upon. Mutually exclusive with
@param global Act globally for all users. Mutually exclusibe with `user`.
The following parameters are available in the systemd::user_service
defined type:
Data type: Systemd::Unit
Default value: $title
Data type: Variant[Boolean,Enum['stopped','running']]
Default value: false
Data type: Boolean
Default value: false
Data type: Boolean
Default value: false
Data type: Optional[String[1]]
Default value: undef
An arbitrary name used as the identity of the resource.
The following properties are available in the loginctl_user
type.
Valid values: enabled
, disabled
Whether linger is enabled for the user.
Default value: disabled
The following parameters are available in the loginctl_user
type.
namevar
An arbitrary name used as the identity of the resource.
The specific backend to use for this loginctl_user
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Type: Puppet Language
Escape strings as systemd-escape does.
$result = systemd::escape('foo::bar')
$result = systemd::escape('/mnt/foobar',true)
The systemd::escape function.
Returns: String
String
$result = systemd::escape('foo::bar')
$result = systemd::escape('/mnt/foobar',true)
Data type: String[1]
Input string
Data type: Boolean
Use path (-p) ornon-path style escaping.
Type: Ruby 4.x API
Escape strings by call the systemd-escape
command in the background.
The systemd::systemd_escape function.
Returns: String
Data type: String
Input string
Data type: Optional[Optional[Boolean]]
Use path (-p) ornon-path style escaping.
Defines systemd boolean type representation
Alias of Variant[Systemd::Boolean::True, Systemd::Boolean::False]
Defines systemd boolean "false" type representation
Alias of Variant[Integer[0,0], Enum['no', 'false'], Boolean[false]]
Defines systemd boolean "true" type representation
Alias of Variant[Integer[1], Enum['yes', 'true'], Boolean[true]]
Defines allowed capabilities
Alias of Variant[Pattern[/^~?(CAP_[A-Z_]+ *)+$/]]
Configurations for coredump.conf
Alias of
Struct[{
Optional['Storage'] => Enum['none', 'external', 'journal'],
Optional['Compress'] => Enum['yes','no'],
Optional['ProcessSizeMax'] => Systemd::Unit::Amount,
Optional['ExternalSizeMax'] => Systemd::Unit::Amount,
Optional['JournalSizeMax'] => Systemd::Unit::Amount,
Optional['MaxUse'] => Systemd::Unit::Amount,
Optional['KeepFree'] => Systemd::Unit::Amount,
}]
custom datatype that validates filenames/paths for valid systemd dropin files
Alias of Pattern['^[^/]+\.conf$']
matches Systemd journal remote config Struct
Alias of
Struct[{
Optional['Seal'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure],
Optional['SplitMode'] => Variant[Enum['host','none'],Systemd::JournaldSettings::Ensure],
Optional['ServerKeyFile'] => Variant[Stdlib::Unixpath,Systemd::JournaldSettings::Ensure],
Optional['ServerCertificateFile'] => Variant[Stdlib::Unixpath,Systemd::JournaldSettings::Ensure],
Optional['TrustedCertificateFile'] => Variant[Stdlib::Unixpath,Systemd::JournaldSettings::Ensure],
Optional['MaxUse'] => Variant[Systemd::Unit::Amount,Systemd::JournaldSettings::Ensure],
Optional['KeepFree'] => Variant[Systemd::Unit::Amount,Systemd::JournaldSettings::Ensure],
Optional['MaxFileSize'] => Variant[Systemd::Unit::Amount,Systemd::JournaldSettings::Ensure],
Optional['MaxFiles'] => Variant[Integer,Systemd::JournaldSettings::Ensure],
}]
matches Systemd journal upload config Struct
Alias of
Struct[{
Optional['URL'] => Variant[Stdlib::HTTPUrl,Systemd::JournaldSettings::Ensure],
Optional['ServerKeyFile'] => Variant[Stdlib::Unixpath,Systemd::JournaldSettings::Ensure],
Optional['ServerCertificateFile'] => Variant[Stdlib::Unixpath,Systemd::JournaldSettings::Ensure],
Optional['TrustedCertificateFile'] => Variant[Stdlib::Unixpath,Systemd::JournaldSettings::Ensure],
Optional['NetworkTimeoutSec'] => Variant[Systemd::Unit::Timespan,Systemd::JournaldSettings::Ensure],
}]
Matches Systemd journald config Struct
Alias of
Struct[{
Optional['Storage'] => Variant[Enum['volatile','persistent','auto','none'],Systemd::JournaldSettings::Ensure],
Optional['Compress'] => Variant[Enum['yes','no'], Systemd::Unit::Amount ,Systemd::JournaldSettings::Ensure],
Optional['Seal'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure],
Optional['SplitMode'] => Variant[Enum['uid','none'],Systemd::JournaldSettings::Ensure],
Optional['RateLimitInterval'] => Variant[Pattern[/^[0-9]+(s|min|h|ms|us)?$/],Systemd::JournaldSettings::Ensure],
Optional['RateLimitIntervalSec'] => Variant[Pattern[/^[0-9]+(s|min|h|ms|us)?$/],Systemd::JournaldSettings::Ensure],
Optional['RateLimitBurst'] => Variant[Integer[0], Pattern[/^[0-9]+$/],Systemd::JournaldSettings::Ensure],
Optional['SystemMaxUse'] => Variant[Systemd::Unit::AmountOrPercent,Systemd::JournaldSettings::Ensure],
Optional['SystemKeepFree'] => Variant[Systemd::Unit::AmountOrPercent,Systemd::JournaldSettings::Ensure],
Optional['SystemMaxFileSize'] => Variant[Systemd::Unit::AmountOrPercent,Systemd::JournaldSettings::Ensure],
Optional['SystemMaxFiles'] => Variant[Integer[0], Pattern[/^[0-9]+$/],Systemd::JournaldSettings::Ensure],
Optional['RuntimeMaxUse'] => Variant[Systemd::Unit::AmountOrPercent ,Systemd::JournaldSettings::Ensure],
Optional['RuntimeKeepFree'] => Variant[Systemd::Unit::AmountOrPercent ,Systemd::JournaldSettings::Ensure],
Optional['RuntimeMaxFileSize'] => Variant[Systemd::Unit::AmountOrPercent ,Systemd::JournaldSettings::Ensure],
Optional['RuntimeMaxFiles'] => Variant[Integer[0], Pattern[/^[0-9]+$/],Systemd::JournaldSettings::Ensure],
Optional['MaxFileSec'] => Variant[Pattern[/^[0-9]+(year|month|week|day|h|m)?$/],Systemd::JournaldSettings::Ensure],
Optional['MaxRetentionSec'] => Variant[Pattern[/^[0-9]+(year|month|week|day|h|m)?$/],Systemd::JournaldSettings::Ensure],
Optional['SyncIntervalSec'] => Variant[Pattern[/^[0-9]+(year|month|week|day|h|m)?$/],Systemd::JournaldSettings::Ensure],
Optional['ForwardToSyslog'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure],
Optional['ForwardToKMsg'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure],
Optional['ForwardToConsole'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure],
Optional['ForwardToWall'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure],
Optional['MaxLevelStore'] => Variant[Enum['emerg','alert','crit','err','warning','notice','info','debug'],Integer[0,7],Systemd::JournaldSettings::Ensure],
Optional['MaxLevelSyslog'] => Variant[Enum['emerg','alert','crit','err','warning','notice','info','debug'],Integer[0,7],Systemd::JournaldSettings::Ensure],
Optional['MaxLevelKMsg'] => Variant[Enum['emerg','alert','crit','err','warning','notice','info','debug'],Integer[0,7],Systemd::JournaldSettings::Ensure],
Optional['MaxLevelConsole'] => Variant[Enum['emerg','alert','crit','err','warning','notice','info','debug'],Integer[0,7],Systemd::JournaldSettings::Ensure],
Optional['MaxLevelWall'] => Variant[Enum['emerg','alert','crit','err','warning','notice','info','debug'],Integer[0,7],Systemd::JournaldSettings::Ensure],
Optional['ReadKMsg'] => Variant[Enum['yes','no'],Systemd::JournaldSettings::Ensure],
Optional['TTYPath'] => Variant[Stdlib::Absolutepath,Systemd::JournaldSettings::Ensure],
Optional['LineMax'] => Variant[Systemd::Unit::Amount,Systemd::JournaldSettings::Ensure],
}]
defines allowed ensure states for systemd-journald settings
Alias of Struct[{ 'ensure' => Enum['present','absent'] }]
Defines allowed log levels
Alias of Variant[Enum['emerg','alert','crit','err','warning','notice','info','debug'], Integer[0,7]]
Matches Systemd Login Manager Struct
Alias of
Struct[{
Optional['HandleHibernateKey'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure],
Optional['HandleLidSwitch'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure],
Optional['HandleLidSwitchDocked'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure],
Optional['HandleLidSwitchExternalPower'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure],
Optional['HandlePowerKey'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure],
Optional['HandleSuspendKey'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure],
Optional['HibernateKeyIgnoreInhibited'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure],
Optional['HoldoffTimeoutSec'] => Variant[Integer,Systemd::LogindSettings::Ensure],
Optional['IdleAction'] => Variant[Enum['ignore','poweroff','reboot','halt','kexec','suspend','hibernate','hybrid-sleep','suspend-then-hibernate','lock'],Systemd::LogindSettings::Ensure],
Optional['IdleActionSec'] => Variant[Integer,Systemd::LogindSettings::Ensure],
Optional['InhibitDelayMaxSec'] => Variant[Integer,Systemd::LogindSettings::Ensure],
Optional['InhibitorsMax'] => Variant[Integer,Systemd::LogindSettings::Ensure],
Optional['KillExcludeUsers'] => Variant[Array[String],Systemd::LogindSettings::Ensure],
Optional['KillOnlyUsers'] => Variant[Array[String],Systemd::LogindSettings::Ensure],
Optional['KillUserProcesses'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure],
Optional['LidSwitchIgnoreInhibited'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure],
Optional['NAutoVTs'] => Variant[Integer,Systemd::LogindSettings::Ensure],
Optional['PowerKeyIgnoreInhibited'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure],
Optional['RemoveIPC'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure],
Optional['ReserveVT'] => Variant[Integer,Systemd::LogindSettings::Ensure],
Optional['RuntimeDirectorySize'] => Variant[Systemd::Unit::AmountOrPercent ,Systemd::LogindSettings::Ensure],
Optional['SessionsMax'] => Variant[Systemd::Unit::Amount,Systemd::LogindSettings::Ensure],
Optional['SuspendKeyIgnoreInhibited'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure],
Optional['UserTasksMax'] => Variant[Systemd::Unit::Amount,Systemd::LogindSettings::Ensure],
Optional['StopIdleSessionSec'] => Variant[Systemd::Unit::Amount,Systemd::LogindSettings::Ensure]
}]
defines allowed ensure states for systemd-logind settings
Alias of Struct[{ 'ensure' => Enum['present','absent'] }]
Matches Systemd machine-info (hostnamectl) file Struct
Alias of
Struct[{
Optional['PRETTY_HOSTNAME'] => String[1],
Optional['ICON_NAME'] => String[1],
Optional['CHASSIS'] => String[1],
Optional['DEPLOYMENT'] => String[1],
Optional['LOCATION'] => String[1],
Optional['HARDWARE_VENDOR'] => String[1],
Optional['HARDWARE_MODEL'] => String[1],
}]
Configurations for oomd.conf
Alias of
Struct[{
Optional['SwapUsedLimit'] => Pattern[/^[0-9]+[%|‰|‱]$/],
Optional['DefaultMemoryPressureLimit'] => Pattern[/^[0-9]+%$/],
Optional['DefaultMemoryPressureDurationSec'] => Integer[0],
}]
Used in DefaultStandardOutput/DefaultStandardError e.g.
Alias of Enum['inherit', 'null', 'tty', 'journal', 'journal+console', 'kmsg', 'kmsg+console']
Deprecated - Matches Systemd Service Limit Struct
Alias of
Struct[{
Optional['LimitCPU'] => Pattern['^\d+(s|m|h|d|w|M|y)?(:\d+(s|m|h|d|w|M|y)?)?$'],
Optional['LimitFSIZE'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitDATA'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitSTACK'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitCORE'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitRSS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitNOFILE'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']],
Optional['LimitAS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitNPROC'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']],
Optional['LimitMEMLOCK'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitLOCKS'] => Integer[1],
Optional['LimitSIGPENDING'] => Integer[1],
Optional['LimitMSGQUEUE'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitNICE'] => Variant[Integer[0,40], Pattern['^(-\+([0-1]?[0-9]|20))|([0-3]?[0-9]|40)$']],
Optional['LimitRTPRIO'] => Integer[0],
Optional['LimitRTTIME'] => Pattern['^\d+(ms|s|m|h|d|w|M|y)?(:\d+(ms|s|m|h|d|w|M|y)?)?$'],
Optional['CPUAccounting'] => Boolean,
Optional['CPUShares'] => Integer[2,262144],
Optional['StartupCPUShares'] => Integer[2,262144],
Optional['CPUQuota'] => Pattern['^([1-9][0-9]*)%$'],
Optional['MemoryAccounting'] => Boolean,
Optional['MemoryLow'] => Pattern['\A(infinity|\d+(K|M|G|T|%)?(:\d+(K|M|G|T|%)?)?)\z'],
Optional['MemoryMin'] => Pattern['\A(infinity|\d+(K|M|G|T|%)?(:\d+(K|M|G|T|%)?)?)\z'],
Optional['MemoryHigh'] => Pattern['\A(infinity|\d+(K|M|G|T|%)?(:\d+(K|M|G|T|%)?)?)\z'],
Optional['MemoryMax'] => Pattern['\A(infinity|\d+(K|M|G|T|%)?(:\d+(K|M|G|T|%)?)?)\z'],
Optional['MemoryLimit'] => Pattern['\A(infinity|\d+(K|M|G|T|%)?(:\d+(K|M|G|T|%)?)?)\z'],
Optional['MemorySwapMax'] => Pattern['\A(infinity|\d+(K|M|G|T|%)?(:\d+(K|M|G|T|%)?)?)\z'],
Optional['TasksAccounting'] => Boolean,
Optional['TasksMax'] => Variant[Integer[1],Pattern['^(infinity|([1-9][0-9]?$|^100)%)$']],
Optional['IOAccounting'] => Boolean,
Optional['IOWeight'] => Integer[1,10000],
Optional['StartupIOWeight'] => Integer[1,10000],
Optional['IODeviceWeight'] => Array[Hash[Stdlib::Absolutepath, Integer[1,10000], 1, 1]],
Optional['IOReadBandwidthMax'] => Array[Hash[Stdlib::Absolutepath, Pattern['^(\d+(K|M|G|T)?)$'], 1, 1]],
Optional['IOWriteBandwidthMax'] => Array[Hash[Stdlib::Absolutepath, Pattern['^(\d+(K|M|G|T)?)$'], 1, 1]],
Optional['IOReadIOPSMax'] => Array[Hash[Stdlib::Absolutepath, Pattern['^(\d+(K|M|G|T)?)$'], 1, 1]],
Optional['IOWriteIOPSMax'] => Array[Hash[Stdlib::Absolutepath, Pattern['^(\d+(K|M|G|T)?)$'], 1, 1]],
Optional['DeviceAllow'] => String[1],
Optional['DevicePolicy'] => Enum['auto','closed','strict'],
Optional['Slice'] => String[1],
Optional['Delegate'] => Boolean,
Optional['OOMScoreAdjust'] => Integer[-1000,1000]
}]
NOTE: Systemd::SettingEnsure here allows to delete the setting from the INI file. See the example below for Hiera:
systemd::system_settings:
LogLevel:
ensure: absent
Alias of
Struct[{
Optional['LogLevel'] => Variant[Systemd::LogLevel, Systemd::SettingEnsure],
Optional['LogTarget'] => Variant[Enum['console','console-prefixed','kmsg','journal','journal-or-kmsg','auto','null'], Systemd::SettingEnsure],
Optional['LogColor'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['LogLocation'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['LogTime'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['DumpCore'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['ShowStatus'] => Variant[Systemd::Boolean, Enum['auto','error'], Systemd::SettingEnsure],
Optional['CrashChangeVT'] => Variant[Systemd::Boolean, Integer[1,63], Systemd::SettingEnsure],
Optional['CrashShell'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['CrashReboot'] => Variant[Systemd::Boolean, Systemd::SettingEnsure], # Obsoleted by CrashAction in v256, delete after Debian 12 EOL
Optional['CrashAction'] => Variant[Enum['freeze', 'reboot', 'poweroff'], Systemd::SettingEnsure],
Optional['CtrlAltDelBurstAction'] => Variant[Enum['reboot-force','poweroff-force','reboot-immediate','poweroff-immediate','none'], Systemd::SettingEnsure],
Optional['CPUAffinity'] => Variant[Enum['numa'], Pattern['^[0-9, -]+$'], Systemd::SettingEnsure],
Optional['NUMAPolicy'] => Variant[Enum['default','preferred','bind','interleave','local'], Systemd::SettingEnsure],
Optional['NUMAMask'] => Variant[Enum['all'], Pattern['^[0-9, -]+$'], Systemd::SettingEnsure],
Optional['RuntimeWatchdogSec'] => Variant[Enum['off','default'], Systemd::Timespan, Systemd::SettingEnsure],
Optional['RuntimeWatchdogPreSec'] => Variant[Enum['off'], Systemd::Timespan, Systemd::SettingEnsure],
Optional['RuntimeWatchdogPreGovernor'] => Variant[Enum['noop', 'panic'], String[1], Systemd::SettingEnsure],
Optional['RebootWatchdogSec'] => Variant[Enum['off','default'], Systemd::Timespan, Systemd::SettingEnsure],
Optional['KExecWatchdogSec'] => Variant[Enum['off','default'], Systemd::Timespan, Systemd::SettingEnsure],
Optional['WatchdogDevice'] => Variant[Stdlib::Absolutepath, Systemd::SettingEnsure],
Optional['CapabilityBoundingSet'] => Variant[Systemd::Capabilities, Systemd::SettingEnsure],
Optional['NoNewPrivileges'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['ProtectSystem'] => Variant[Enum['auto'], Systemd::Boolean, Systemd::SettingEnsure],
Optional['SystemCallArchitectures'] => Variant[String[1], Systemd::SettingEnsure],
Optional['TimerSlackNSec'] => Variant[Systemd::Timespan, Systemd::SettingEnsure],
Optional['StatusUnitFormat'] => Variant[Enum['combined','description','name'], Systemd::SettingEnsure],
Optional['DefaultTimerAccuracySec'] => Variant[Systemd::Timespan, Systemd::SettingEnsure],
Optional['DefaultStandardOutput'] => Variant[Systemd::Output, Systemd::SettingEnsure],
Optional['DefaultStandardError'] => Variant[Systemd::Output, Systemd::SettingEnsure],
Optional['DefaultTimeoutStartSec'] => Variant[Systemd::Timespan, Systemd::SettingEnsure],
Optional['DefaultTimeoutStopSec'] => Variant[Systemd::Timespan, Systemd::SettingEnsure],
Optional['DefaultTimeoutAbortSec'] => Variant[Systemd::Timespan, Systemd::SettingEnsure],
Optional['DefaultDeviceTimeoutSec'] => Variant[Systemd::Timespan, Systemd::SettingEnsure],
Optional['DefaultRestartSec'] => Variant[Systemd::Timespan, Systemd::SettingEnsure],
Optional['DefaultStartLimitIntervalSec'] => Variant[Enum['infinity'], Systemd::Timespan, Systemd::SettingEnsure],
Optional['DefaultStartLimitBurst'] => Variant[Integer[0], Systemd::SettingEnsure],
Optional['DefaultEnvironment'] => Variant[String, Systemd::SettingEnsure],
Optional['ManagerEnvironment'] => Variant[String, Systemd::SettingEnsure],
Optional['DefaultCPUAccounting'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['DefaultBlockIOAccounting'] => Variant[Systemd::Boolean, Systemd::SettingEnsure], # Deprecated in v252. Delete after Debian 11 EOL
Optional['DefaultIOAccounting'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['DefaultIPAccounting'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['DefaultMemoryAccounting'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['DefaultTasksAccounting'] => Variant[Systemd::Boolean, Systemd::SettingEnsure],
Optional['DefaultTasksMax'] => Variant[Enum['infinity'], Integer[0], Systemd::Unit::Percent, Systemd::SettingEnsure],
Optional['DefaultLimitCPU'] => Variant[Enum['infinity'], Pattern['^\d+(s|m|h|d|w|M|y)?(:\d+(s|m|h|d|w|M|y)?)?$'], Systemd::SettingEnsure],
Optional['DefaultLimitFSIZE'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitDATA'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitSTACK'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitCORE'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitRSS'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitNOFILE'] => Variant[Integer[-1], Pattern['^(infinity|\d+(:(infinity|\d+))?)$'], Systemd::SettingEnsure],
Optional['DefaultLimitAS'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitNPROC'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$'], Systemd::SettingEnsure],
Optional['DefaultLimitMEMLOCK'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitLOCKS'] => Variant[Integer[1], Systemd::SettingEnsure],
Optional['DefaultLimitSIGPENDING'] => Variant[Integer[1], Systemd::SettingEnsure],
Optional['DefaultLimitMSGQUEUE'] => Variant[Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'], Systemd::SettingEnsure],
Optional['DefaultLimitNICE'] => Variant[Integer[0,40], Pattern['^(-\+([0-1]?[0-9]|20))|([0-3]?[0-9]|40)$'], Systemd::SettingEnsure],
Optional['DefaultLimitRTPRIO'] => Variant[Integer[0], Systemd::SettingEnsure],
Optional['DefaultLimitRTTIME'] => Variant[Pattern['^\d+(ms|s|m|h|d|w|M|y)?(:\d+(ms|s|m|h|d|w|M|y)?)?$'], Systemd::SettingEnsure],
Optional['DefaultOOMPolicy'] => Variant[Enum['continue', 'stop','kill'], Systemd::SettingEnsure],
Optional['DefaultSmackProcessLabel'] => Variant[String, Systemd::SettingEnsure],
Optional['ReloadLimitIntervalSec'] => Variant[Enum['infinity'], Systemd::Timespan, Systemd::SettingEnsure],
Optional['ReloadLimitBurst'] => Variant[Integer[0], Systemd::SettingEnsure],
Optional['DefaultMemoryPressureWatch'] => Variant[Systemd::SettingEnsure],
Optional['DefaultMemoryPressureThresholdSec'] => Variant[Systemd::SettingEnsure],
}]
Defines allowed ensure states for an ini_setting
Alias of Struct[{ 'ensure' => Enum['absent'] }]
Defines a timespan type
Alias of Variant[Integer[0], Pattern[/^([0-9]+ *(usec|us|msec|ms|seconds?|sec|s|minutes?|min|m|hours?|hr|h|days?|d|weeks?|w|months?|M|years?|y)? *)+$/]]
custom datatype that validates different filenames for systemd units and unit templates
Alias of Pattern[/^[a-zA-Z0-9:\-_.\\@%]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$/]
Systemd definition of amount, often bytes or united bytes Some man pages are lagging behind and only report support up to Tera. https://github.com/systemd/systemd/blob/main/src/basic/format-util.c shows support for Peta and Exa.
- See also
Alias of Variant[Integer[0], Pattern['\A(infinity|\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)\z']]
Systemd definition of amount, often bytes or united bytes
- See also
Alias of Variant[Systemd::Unit::Amount, Systemd::Unit::Percent]
Possible keys for the [Install] section of a unit file
Alias of
Struct[{
Optional['Alias'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['WantedBy'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['RequiredBy'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['Also'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
}]
Possible keys for the [Mount] section of a unit file
Alias of
Struct[{
Optional['What'] => String[1],
Optional['Where'] => Stdlib::Unixpath,
Optional['Type'] => String[1],
Optional['Options'] => String[1],
Optional['SloppyOptions'] => Boolean,
Optional['LazyUnmount'] => Boolean,
Optional['ReadWriteOnly'] => Boolean,
Optional['ForceUnmount'] => Boolean,
Optional['DirectoryMode'] => Stdlib::Filemode,
Optional['TimeoutSec'] => String[0],
}]
Possible keys for the [Path] section of a unit file
Alias of
Struct[{
Optional['PathExists'] => Variant[Enum[''],Stdlib::Unixpath,Array[Variant[Enum[''],Stdlib::Unixpath],1]],
Optional['PathExistsGlob'] => Variant[Enum[''],Stdlib::Unixpath,Array[Variant[Enum[''],Stdlib::Unixpath],1]],
Optional['PathChanged'] => Variant[Enum[''],Stdlib::Unixpath,Array[Variant[Enum[''],Stdlib::Unixpath],1]],
Optional['PathModified'] => Variant[Enum[''],Stdlib::Unixpath,Array[Variant[Enum[''],Stdlib::Unixpath],1]],
Optional['DirectoryNotEmpty'] => Variant[Enum[''],Stdlib::Unixpath,Array[Variant[Enum[''],Stdlib::Unixpath],1]],
Optional['Unit'] => Systemd::Unit,
Optional['MakeDirectory'] => Boolean,
Optional['DirectoryMode'] => Pattern[/\A[0-7]{1,4}\z/],
Optional['TriggerLimitIntervalSec'] => String,
Optional['TriggerLimitBurst'] => Integer[0],
}]
Systemd definition of a percentage
- See also
Alias of Pattern['\A([0-9][0-9]?|100)%\z']
Possible keys for the [Service] section of a unit file
- See also
Alias of
Struct[{
Optional['AmbientCapabilities'] => Variant[Pattern[/^CAP_[A-Z_]+$/],Array[Pattern[/^CAP_[A-Z_]+$/],1]],
Optional['UMask'] => String[3,4],
Optional['User'] => String[1],
Optional['Group'] => String[1],
Optional['DynamicUser'] => Boolean,
Optional['SupplementaryGroups'] => Variant[String[0],Array[String[0],1]],
Optional['WorkingDirectory'] => String[0],
Optional['Type'] => Enum['simple', 'exec', 'forking', 'oneshot', 'dbus', 'notify', 'idle'],
Optional['ExitType'] => Enum['main', 'cgroup'],
Optional['RemainAfterExit'] => Boolean,
Optional['GuessMainPID'] => Boolean,
Optional['PIDFile'] => Stdlib::Unixpath,
Optional['BusName'] => String[1],
Optional['ExecStart'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecStartPre'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecStartPost'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecCondition'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecReload'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecStop'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecStopPost'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['KillSignal'] => Pattern[/^SIG[A-Z]+$/],
Optional['KillMode'] => Enum['control-group', 'mixed', 'process', 'none'],
Optional['Nice'] => Variant[String[0,0],Integer[-20,19]],
Optional['IOSchedulingClass'] => Enum['','realtime','best-effort','idle'],
Optional['IOSchedulingPriority'] => Variant[String[0,0],Integer[0,7]],
Optional['SyslogIdentifier'] => String,
Optional['LogLevelMax'] => Enum['emerg','alert','crit','err','warning','notice','info','debug'],
Optional['LimitCPU'] => Pattern['^\d+(s|m|h|d|w|M|y)?(:\d+(s|m|h|d|w|M|y)?)?$'],
Optional['LimitFSIZE'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitDATA'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitSTACK'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitCORE'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitRSS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitNOFILE'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']],
Optional['LimitAS'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitNPROC'] => Variant[Integer[-1],Pattern['^(infinity|\d+(:(infinity|\d+))?)$']],
Optional['LimitMEMLOCK'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitLOCKS'] => Integer[1],
Optional['LimitSIGPENDING'] => Integer[1],
Optional['LimitMSGQUEUE'] => Pattern['^(infinity|((\d+(K|M|G|T|P|E)?(:\d+(K|M|G|T|P|E)?)?)))$'],
Optional['LimitNICE'] => Variant[Integer[0,40], Pattern['^(-\+([0-1]?[0-9]|20))|([0-3]?[0-9]|40)$']],
Optional['LimitRTPRIO'] => Integer[0],
Optional['LimitRTTIME'] => Pattern['^\d+(ms|s|m|h|d|w|M|y)?(:\d+(ms|s|m|h|d|w|M|y)?)?$'],
Optional['CPUAccounting'] => Boolean,
Optional['CPUShares'] => Integer[2,262144],
Optional['StartupCPUShares'] => Integer[2,262144],
Optional['CPUQuota'] => Pattern['^([1-9][0-9]*)%$'], # bigger than 100% is okay.
Optional['MemoryAccounting'] => Boolean,
Optional['MemoryLow'] => Systemd::Unit::AmountOrPercent,
Optional['MemoryMin'] => Systemd::Unit::AmountOrPercent,
Optional['MemoryHigh'] => Systemd::Unit::AmountOrPercent,
Optional['MemoryMax'] => Systemd::Unit::AmountOrPercent,
Optional['MemoryLimit'] => Systemd::Unit::Amount,
Optional['MemorySwapMax'] => Systemd::Unit::AmountOrPercent,
Optional['TasksAccounting'] => Boolean,
Optional['TasksMax'] => Systemd::Unit::AmountOrPercent,
Optional['IOAccounting'] => Boolean,
Optional['IOWeight'] => Integer[1,10000],
Optional['StartupIOWeight'] => Integer[1,10000],
Optional['IODeviceWeight'] => Variant[Tuple[Stdlib::Absolutepath, Integer[1,10000]],Array[Tuple[Stdlib::Absolutepath, Integer[1,10000]]]],
Optional['IOReadBandwidthMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['IOWriteBandwidthMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['IOReadIOPSMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['IOWriteIOPSMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['DeviceAllow'] => String[1],
Optional['DevicePolicy'] => Enum['auto','closed','strict'],
Optional['Slice'] => String[1],
Optional['Delegate'] => Boolean,
Optional['RestartSec'] => Variant[Integer[0],String],
Optional['TimeoutStartSec'] => Variant[Integer[0],String],
Optional['TimeoutStopSec'] => Variant[Integer[0],String],
Optional['TimeoutAbortSec'] => Variant[Integer[0],String],
Optional['TimeoutSec'] => Variant[Integer[0],String],
Optional['TimeoutStartFailureMode'] => Enum['terminate', 'abort', 'kill'],
Optional['TimeoutStopFailureMode'] => Enum['terminate', 'abort', 'kill'],
Optional['RuntimeMaxSec'] => Variant[Integer[0],String],
Optional['RuntimeRandomizedExtraSec'] => Variant[Integer[0],String],
Optional['WatchdogSec'] => Variant[Integer[0],String],
Optional['Restart'] => Enum['no', 'on-success', 'on-failure', 'on-abnormal', 'on-watchdog', 'on-abort', 'always'],
Optional['SuccessExitStatus'] => String,
Optional['RestartPreventExitStatus'] => String,
Optional['RestartForceExitStatus'] => String,
Optional['RootDirectoryStartOnly'] => Boolean,
Optional['NonBlocking'] => Boolean,
Optional['NotifyAccess'] => Enum['none', 'default', 'main', 'exec', 'all'],
Optional['OOMPolicy'] => Enum['continue', 'stop','kill'],
Optional['OOMScoreAdjust'] => Integer[-1000,1000],
Optional['Environment'] => Variant[String[0],Array[String[1],1]],
Optional['EnvironmentFile'] => Variant[
Stdlib::Unixpath,Pattern[/-\/.+/],
Array[Variant[Stdlib::Unixpath,Pattern[/-\/.+/]],1],
],
Optional['StandardOutput'] => Variant[Enum['inherit','null','tty','journal','kmsg','journal+console','kmsg+console','socket'],Pattern[/\A(file:|append:|truncate:).+$\z/]],
Optional['StandardError'] => Variant[Enum['inherit','null','tty','journal','kmsg','journal+console','kmsg+console','socket'],Pattern[/\A(file:|append:|truncate:).+$\z/]],
Optional['StandardInput'] => Variant[Enum['null','tty','tty-force','tty-fail','data','socket'], Pattern[/\A(file:|fd:).+$\z/]],
Optional['PrivateTmp'] => Boolean,
Optional['RuntimeDirectory'] => String,
Optional['RuntimeDirectoryMode'] => Stdlib::Filemode,
Optional['StateDirectory'] => String,
Optional['LogsDirectory'] => String,
Optional['LogsDirectoryMode'] => Stdlib::Filemode,
Optional['LogRateLimitIntervalSec'] => Variant[Pattern[/^[0-9]+(s|min|h|ms|us)?$/]],
Optional['LogRateLimitBurst'] => Variant[Integer[0], Pattern[/^[0-9]+$/]],
Optional['ProtectSystem'] => Variant[Boolean, Enum['full', 'strict']],
Optional['ProtectHome'] => Variant[Boolean, Enum['read-only', 'tmpfs']],
Optional['BindPaths'] => Variant[Stdlib::Unixpath,Pattern[/-\/.+/], Array[Variant[Stdlib::Unixpath,Pattern[/-\/.+/]],1]],
Optional['BindReadOnlyPaths'] => Variant[Stdlib::Unixpath,Pattern[/-\/.+/], Array[Variant[Stdlib::Unixpath,Pattern[/-\/.+/]],1]],
Optional['PrivateDevices'] => Boolean,
Optional['RemoveIPC'] => Boolean,
Optional['ProtectKernelModules'] => Boolean,
Optional['ProtectKernelTunables'] => Boolean,
Optional['ProtectControlGroups'] => Boolean,
Optional['RestrictRealtime'] => Boolean,
Optional['RestrictAddressFamilies'] => Variant[Enum['AF_UNIX', 'AF_INET', 'AF_INET6', 'AF_NETLINK', 'none'], Array[Enum['AF_UNIX', 'AF_INET', 'AF_INET6', 'AF_NETLINK', 'none']]],
Optional['RestrictNamespaces'] => Variant[Boolean, Enum['ipc', 'net', 'mnt', 'pid', 'user', 'uts', 'cgroup'], Array[Enum['ipc', 'net', 'mnt', 'pid', 'user', 'uts', 'cgroup']]],
Optional['SystemCallArchitectures'] => Variant[String, Array[String]],
Optional['SystemCallFilter'] => Variant[String, Array[String]],
Optional['SystemCallErrorNumber'] => String,
Optional['ProtectClock'] => Boolean,
Optional['PrivateUsers'] => Boolean,
Optional['ProtectKernelLogs'] => Boolean,
Optional['ProtectProc'] => Enum['noaccess', 'invisible', 'ptraceable', 'default'],
Optional['ProtectHostname'] => Boolean,
Optional['RestrictSUIDSGID'] => Boolean,
Optional['CapabilityBoundingSet'] => Variant[String, Array[String]],
Optional['NoNewPrivileges'] => Boolean,
Optional['LockPersonality'] => Boolean,
Optional['NetworkNamespacePath'] => Stdlib::Unixpath,
Optional['MemoryDenyWriteExecute'] => Boolean,
}]
Possible strings for ExecStart, ExecStartPrep, ...
- See also
Alias of Variant[Enum[''], Pattern[/^[@\-:]*(\+|!|!!)?[@\-:]*\/.*/], Pattern[/^[@\-:]*(\+|!|!!)?[@\-:]*[^\/]*(\s.*)?$/]]
Possible keys for the [Slice] section of a unit file
- See also
Alias of
Struct[{
Optional['CPUAccounting'] => Boolean,
Optional['CPUQuota'] => Pattern['^([1-9][0-9]*)%$'], # bigger than 100% is okay.
Optional['CPUShares'] => Integer[2,262144],
Optional['CPUWeight'] => Variant[Enum['idle'],Integer[1,10000]],
Optional['Delegate'] => Boolean,
Optional['DeviceAllow'] => Pattern['^(/dev/)|(char-)|(block-).*$'],
Optional['DevicePolicy'] => Enum['auto','closed','strict'],
Optional['IOAccounting'] => Boolean,
Optional['IODeviceWeight'] => Variant[Tuple[Stdlib::Absolutepath, Integer[1,10000]],Array[Tuple[Stdlib::Absolutepath, Integer[1,10000]]]],
Optional['IOReadBandwidthMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['IOReadIOPSMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['IOWeight'] => Integer[1,10000],
Optional['IOWriteBandwidthMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['IOWriteIOPSMax'] => Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]],
Optional['IPAccounting'] => Boolean,
Optional['MemoryAccounting'] => Boolean,
Optional['MemoryHigh'] => Systemd::Unit::AmountOrPercent,
Optional['MemoryLimit'] => Systemd::Unit::AmountOrPercent, # depprecated in systemd
Optional['MemoryLow'] => Systemd::Unit::AmountOrPercent,
Optional['MemoryMax'] => Systemd::Unit::AmountOrPercent,
Optional['MemoryMin'] => Systemd::Unit::AmountOrPercent,
Optional['MemorySwapMax'] => Systemd::Unit::AmountOrPercent,
Optional['Slice'] => String[1],
Optional['StartupCPUShares'] => Integer[2,262144],
Optional['StartupIOWeight'] => Integer[1,10000],
Optional['TasksAccounting'] => Boolean,
Optional['TasksMax'] => Systemd::Unit::AmountOrPercent,
}]
Possible keys for the [Socket] section of a unit file
Alias of
Struct[{
Optional['ListenStream'] => Variant[Stdlib::Port,String[1]],
Optional['ListenDatagram'] => Variant[Stdlib::Port,String[1]],
Optional['ListenSequentialPacket'] => Variant[Stdlib::Port,String[1]],
Optional['ListenFIFO'] => Stdlib::Unixpath,
Optional['ListenSpecial'] => Stdlib::Unixpath,
Optional['ListenNetlink'] => String[1],
Optional['ListenMessageQueue'] => Pattern[/\A\/.*\z/],
Optional['ListenUSBFunction'] => Stdlib::Unixpath,
Optional['SocketProtocol'] => Enum['udplite', 'sctp'],
Optional['BindIPv6Only'] => Enum['default', 'both', 'ipv6-only'],
Optional['Backlog'] => Integer[0],
Optional['BindToDevice'] => String[1],
Optional['SocketUser'] => String[1],
Optional['SocketGroup'] => String[1],
Optional['SocketMode'] => Stdlib::Filemode,
Optional['DirectoryMode'] => Stdlib::Filemode,
Optional['Accept'] => Boolean,
Optional['Writable'] => Boolean,
Optional['FlushPending'] => Boolean,
Optional['MaxConnections'] => Integer[0],
Optional['MaxConnectionsPerSource'] => Integer[0],
Optional['KeepAlive'] => Boolean,
Optional['KeepAliveTimeSec'] => Integer[0],
Optional['KeepAliveIntervalSec'] => Integer[0],
Optional['KeepAliveProbes'] => Integer[0],
Optional['NoDelay'] => Boolean,
Optional['Priority'] => Integer,
Optional['DeferAcceptSec'] => Integer[0],
Optional['ReceiveBuffer'] => Variant[Integer[0],String[1]],
Optional['SendBuffer'] => Variant[Integer[0],String[1]],
Optional['IPTOS'] => Variant[Integer,Enum['low-delay', 'throughput', 'reliability', 'low-cost']],
Optional['IPTTL'] => Integer[0],
Optional['Mark'] => String[1],
Optional['ReusePort'] => Boolean,
Optional['SmackLabel'] => String[1],
Optional['SmackLabelIPIn'] => String[1],
Optional['SmackLabelIPOut'] => String[1],
Optional['SELinuxContextFromNet'] => Boolean,
Optional['PipeSize'] => Variant[Integer[0],String[1]],
Optional['FreeBind'] => Boolean,
Optional['Transparent'] => Boolean,
Optional['Broadcast'] => Boolean,
Optional['PassCredentials'] => Boolean,
Optional['PassSecurity'] => Boolean,
Optional['PassPacketInfo'] => Boolean,
Optional['Timestamping'] => Enum['off', 'us', 'usec', 'ns'],
Optional['TCPCongestion'] => Enum['westwood', 'veno', 'cubic', 'lp'],
Optional['ExecStartPre'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecStartPost'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecStopPre'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['ExecStopPost'] => Variant[Systemd::Unit::Service::Exec,Array[Systemd::Unit::Service::Exec,1]],
Optional['TimeoutSec'] => String[1],
Optional['Service'] => Systemd::Unit,
Optional['RemoveOnStop'] => Boolean,
Optional['Symlinks'] => Variant[Stdlib::Unixpath,Array[Stdlib::Unixpath,1]],
Optional['FileDescriptorName'] => String[1,255],
Optional['TriggerLimitIntervalSec'] => String[1],
Optional['TriggerLimitBurst'] => Integer[0],
}]
Possible keys for the [Swap] section of a unit file
Alias of
Struct[{
Optional['What'] => String[1],
Optional['Options'] => String[1],
Optional['Priority'] => Integer,
Optional['TimeoutSec'] => Variant[Integer[0],String[0]]
}]
Possible keys for the [Timer] section of a unit file
Alias of
Struct[{
Optional['OnActiveSec'] => Systemd::Unit::Timespan,
Optional['OnBootSec'] => Systemd::Unit::Timespan,
Optional['OnStartUpSec'] => Systemd::Unit::Timespan,
Optional['OnUnitActiveSec'] => Systemd::Unit::Timespan,
Optional['OnUnitInactiveSec'] => Systemd::Unit::Timespan,
Optional['OnCalendar'] => Systemd::Unit::Timespan,
Optional['AccuracySec'] => Variant[Integer[0],String],
Optional['RandomizedDelaySec'] => Variant[Integer[0],String],
Optional['FixedRandomDelay'] => Boolean,
Optional['OnClockChange'] => Boolean,
Optional['OnTimezoneChange'] => Boolean,
Optional['Unit'] => Systemd::Unit,
Optional['Persistent'] => Boolean,
Optional['WakeSystem'] => Boolean,
Optional['RemainAfterElapse'] => Boolean,
}]
Timer specification for systemd time spans, e.g. timers.
Alias of Variant[Integer[0], String, Array[Variant[Integer[0],String]]]
Possible keys for the [Unit] section of a unit file
Alias of
Struct[{
Optional['Description'] => Variant[String,Array[String,1]],
Optional['Documentation'] => Variant[String,Array[String,1]],
Optional['Wants'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['Requires'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['Requisite'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['BindsTo'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['PartOf'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['Upholds'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['Conflicts'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['Before'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['After'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['OnFailure'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['OnSuccess'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['PropagatesReloadTo'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['ReloadPropagatedFrom'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['PropagatesStopTo'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['StopPropagatedFrom'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['JoinsNamespaceOf'] => Variant[Enum[''],Systemd::Unit,Array[Variant[Enum[''],Systemd::Unit],1]],
Optional['RequiresMountsFor'] => Variant[Enum[''],Stdlib::Unixpath,Array[Variant[Enum[''],Stdlib::Unixpath],1]],
Optional['OnSuccessJobMode'] => Enum['fail', 'replace', 'replace-irreversibly', 'isolate', 'flush', 'ignore-dependencies', 'ignore-requirements'],
Optional['OnFailureJobMode'] => Enum['fail', 'replace', 'replace-irreversibly', 'isolate', 'flush', 'ignore-dependencies', 'ignore-requirements'],
Optional['IgnoreOnIsolate'] => Boolean,
Optional['StopWhenUnneeded'] => Boolean,
Optional['RefuseManualStart'] => Boolean,
Optional['RefuseManualStop'] => Boolean,
Optional['AllowIsolate'] => Boolean,
Optional['DefaultDependencies'] => Boolean,
Optional['SurviveFinalKillSignal'] => Boolean,
Optional['CollectMode'] => Enum['inactive', 'inactive-or-failed'],
Optional['FailureAction'] => Enum['none', 'reboot', 'reboot-force', 'reboot-immediate', 'poweroff', 'poweroff-force', 'poweroff-immediate', 'exit', 'exit-force', 'soft-reboot', 'soft-reboot-force', 'kexec', 'kexec-force', 'halt', 'halt-force', 'halt-immediate'],
Optional['SuccessAction'] => Enum['none', 'reboot', 'reboot-force', 'reboot-immediate', 'poweroff', 'poweroff-force', 'poweroff-immediate', 'exit', 'exit-force', 'soft-reboot', 'soft-reboot-force', 'kexec', 'kexec-force', 'halt', 'halt-force', 'halt-immediate'],
Optional['FailureActionExitStatus'] => Variant[Enum[''],Integer[0, 255]],
Optional['SuccessActionExitStatus'] => Variant[Enum[''],Integer[0, 255]],
# Conditions and Asserts
Optional['AssertPathExists'] => Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/],Array[Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/]],1]],
Optional['AssertPathIsDirectory'] => Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/],Array[Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/]],1]],
Optional['ConditionPathExists'] => Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/],Array[Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/]],1]],
Optional['ConditionPathIsDirectory'] => Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/],Array[Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/]],1]],
Optional['ConditionPathIsMountPoint'] => Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/],Array[Variant[Enum[''],Stdlib::Unixpath,Pattern[/^!.*$/]],1]],
Optional['StartLimitIntervalSec'] => String[1],
Optional['StartLimitBurst'] => Integer[1],
}]
Get systemctl show output of a unit
Supports noop? false
Data type: String[1]
Path to systemctl binary
Data type: Array[String[1]]
Properties to retrieve from the unit
Data type: String[1]
Name of the unit