Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
- Puppet >= 6.1.0 < 8.0.0
- Archlinux, , , , , , , ,
This module has been deprecated by its author since Aug 16th 2021.
The reason given was: No longer maintained
The author has suggested puppet-systemd as its replacement.
Start using this module
Documentation
Systemd
Overview
This module declares exec resources to create global sync points for reloading systemd.
Version 2 and newer of the module don't work with Hiera 3! You need to migrate your existing Hiera setup to Hiera 5
Usage and examples
There are two ways to use this module.
unit files
Let this module handle file creation.
systemd::unit_file { 'foo.service':
source => "puppet:///modules/${module_name}/foo.service",
}
~> service {'foo':
ensure => 'running',
}
This is equivalent to:
file { '/usr/lib/systemd/system/foo.service':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///modules/${module_name}/foo.service",
}
~> service {'foo':
ensure => 'running',
}
You can also use this module to more fully manage the new unit. This example deploys the unit, reloads systemd and then enables and starts it.
systemd::unit_file { 'foo.service':
source => "puppet:///modules/${module_name}/foo.service",
enable => true,
active => true,
}
drop-in files
Drop-in files are used to add or alter settings of a unit without modifying the unit itself. As for the unit files, the module can handle the file and directory creation:
systemd::dropin_file { 'foo.conf':
unit => 'foo.service',
source => "puppet:///modules/${module_name}/foo.conf",
}
~> service {'foo':
ensure => 'running',
}
This is equivalent to:
file { '/etc/systemd/system/foo.service.d':
ensure => directory,
owner => 'root',
group => 'root',
}
file { '/etc/systemd/system/foo.service.d/foo.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///modules/${module_name}/foo.conf",
}
~> service {'foo':
ensure => 'running',
}
dropin-files can also be generated via hiera:
systemd::dropin_files:
my-foo.conf:
unit: foo.service
source: puppet:///modules/${module_name}/foo.conf
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::tmpfiles
file { '/etc/tmpfiles.d/foo.conf':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///modules/${module_name}/foo.conf",
}
~> Class['systemd::tmpfiles']
timer units
Create a systemd timer unit and a systemd service unit to execute from that timer
The following will create a timer unit and a service unit file.
When active
and enable
are set to true
the puppet service runoften.timer
will be
declared, started and enabled.
systemd::timer{'runoften.timer':
timer_source => "puppet:///modules/${module_name}/runoften.timer",
service_source => "puppet:///modules/${module_name}/runoften.service",
active => true,
enable => true,
}
A trivial daily run.
In this case enable and active are both unset and so the service daily.timer
is not declared by the systemd::timer
type.
$_timer = @(EOT)
[Timer]
OnCalendar=daily
RandomizedDelaySec=1d
EOT
$_service = @(EOT)
[Service]
Type=oneshot
ExecStart=/usr/bin/touch /tmp/file
EOT
systemd::timer{'daily.timer':
timer_content => $_timer,
service_content => $_service,
}
service{'daily.timer':
ensure => running,
subscribe => Systemd::Timer['daily.timer'],
}
If neither service_content
or service_source
are specified then no
service unit will be created.
The service unit name can also be specified.
$_timer = @(EOT)
[Timer]
OnCalendar=daily
RandomizedDelaySec=1d
Unit=touch-me-today.service
EOT
$_service = @(EOT)
[Service]
Type=oneshot
ExecStart=/usr/bin/touch /tmp/file
EOT
systemd::timer{'daily.timer':
timer_content => $_timer,
service_unit => 'touch-me-today.service',
service_content => $_service,
active => true,
enable => true,
}
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",
}
Daemon reloads
Systemd caches unit files and their relations. This means it needs to reload, typically done via systemctl daemon-reload
. Since Puppet 6.1.0 (PUP-3483) takes care of this by calling systemctl show $SERVICE -- --property=NeedDaemonReload
to determine if a reload is needed. Typically this works well and removes the need for systemd::systemctl::daemon_reload
as provided prior to camptocamp/systemd 3.0.0. This avoids common circular dependencies.
It does contain a workaround for PUP-9473 but there's no guarantee that this works in every case.
network
systemd-networkd is able to manage your network configuration. We provide a defined resource which can write the interface configurations. systemd-networkd needs to be restarted to apply the configs. The defined resource can do this for you:
systemd::network{'eth0.network':
source => "puppet:///modules/${module_name}/eth0.network",
restart_service => true,
}
Services
Systemd provides multiple services. Currently you can manage systemd-resolved
,
systemd-timesyncd
, systemd-networkd
, systemd-journald
and systemd-logind
via the main class:
class{'systemd':
manage_resolved => true,
manage_networkd => true,
manage_timesyncd => true,
manage_journald => true,
manage_udevd => true,
manage_logind => true,
}
$manage_networkd is required if you want to reload it for new
systemd::network
resources. Setting $manage_resolved will also manage your
/etc/resolv.conf
.
When configuring systemd::resolved
you could set dns_stub_resolver
to false (default) to use a standard /etc/resolved.conf
, or you could set it to true
to use the local resolver provided by systemd-resolved
.
Systemd has introduced DNS Over TLS
in the release 239. Currently two states are supported no
and opportunistic
. When enabled with opportunistic
systemd-resolved
will start a TCP-session to a DNS server with DNS Over TLS
support. Note that there will be no host checking for DNS Over TLS
due to missing implementation in systemd-resolved
.
It is possible to configure the default ntp servers in /etc/systemd/timesyncd.conf
:
class{'systemd':
manage_timesyncd => true,
ntp_server => ['0.pool.ntp.org', '1.pool.ntp.org'],
fallback_ntp_server => ['2.pool.ntp.org', '3.pool.ntp.org'],
}
This requires puppetlabs-inifile, which is only a soft dependency in this module (you need to explicitly install it). Both parameters accept a string or an array.
Resource Accounting
Systemd has support for different accounting option. It can track
CPU/Memory/Network stats per process. This is explained in depth at systemd-system.conf.
This defaults to off (default on most operating systems). You can enable this
with the $manage_accounting
parameter. The module provides a default set of
working accounting options per operating system, but you can still modify them
with $accounting
:
class{'systemd':
manage_accounting => true,
accounting => {
'DefaultCPUAccounting' => 'yes',
'DefaultMemoryAccounting' => 'no',
}
}
journald configuration
It also allows you to manage journald settings. You can manage journald settings through setting the journald_settings
parameter. If you want a parameter to be removed, you can pass its value as params.
systemd::journald_settings:
Storage: auto
MaxRetentionSec: 5day
MaxLevelStore:
ensure: absent
udevd configuration
It allows you to manage the udevd configuration. You can set the udev.conf values via the udev_log
, udev_children_max
, udev_exec_delay
, udev_event_timeout
, udev_resolve_names
, and udev_timeout_signal
parameters.
Additionally you can set custom udev rules with the udev_rules
parameter.
class { 'systemd':
manage_udevd => true,
udev_rules => {
'example_raw.rules' => {
'rules' => [
'ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"',
'ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"',
],
},
},
}
udev::rules configuration
Custom udev rules can be defined for specific events.
systemd::udev::rule:
ensure: present
path: /etc/udev/rules.d
selinux_ignore_defaults: false
notify: "Service[systemd-udevd']"
rules:
- 'ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"'
- 'ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw2 %N"',
logind configuration
It also allows you to manage logind settings. You can manage logind settings through setting the logind_settings
parameter. If you want a parameter to be removed, you can pass its value as params.
systemd::logind_settings:
HandleSuspendKey: 'ignore'
KillUserProcesses: 'no'
RemoveIPC:
ensure: absent
UserTasksMax: 10000
User linger
A loginctl_user
resource is available to manage user linger enablement:
loginctl_user { 'foo':
linger => enabled,
}
or as a hash via the systemd::loginctl_users
parameter.
Reference
Table of Contents
Classes
Public Classes
systemd
: This module allows triggering systemd commands once for all modulessystemd::tmpfiles
: Update the systemd temp files
Private Classes
systemd::journald
: This class manages and configures journald. https://www.freedesktop.org/software/systemd/man/journald.conf.htmlsystemd::logind
: This class manages systemd's login manager configuration. https://www.freedesktop.org/software/systemd/man/logind.conf.htmlsystemd::networkd
: This class provides an abstract way to trigger systemd-networkdsystemd::resolved
: This class provides an abstract way to trigger resolved. Each parameters correspond to resolved.conf(5): https://www.freedesktop.org/softwaresystemd::system
: This class provides a solution to enable accountingsystemd::timesyncd
: This class provides an abstract way to trigger systemd-timesyncd
Defined types
systemd::dropin_file
: Creates a drop-in file for a systemd unitsystemd::network
: -- Define: systemd::network Creates network config for systemd-networkdsystemd::service_limits
: Adds a set of custom limits to the service * Mutually exclusive with$limits
systemd::timer
: Create a timer and optionally a service unit to execute with the timer unitsystemd::tmpfile
: Creates a systemd tmpfile * Mutually exclusive with$limits
systemd::unit_file
: Creates a systemd unit file
Resource types
loginctl_user
: An arbitrary name used as the identity of the resource.
Data types
Systemd::Dropin
Systemd::JournaldSettings
: Matches Systemd journald config StructSystemd::JournaldSettings::Ensure
Systemd::LogindSettings
: Matches Systemd Login Manager StructSystemd::LogindSettings::Ensure
Systemd::ServiceLimits
: Matches Systemd Service Limit StructSystemd::Unit
Classes
systemd
This module allows triggering systemd commands once for all modules
Parameters
The following parameters are available in the systemd
class.
service_limits
Data type: Hash[String,Hash[String, Any]]
May be passed a resource hash suitable for passing directly into the
create_resources()
function as called on systemd::service_limits
manage_resolved
Data type: Boolean
Manage the systemd resolver
resolved_ensure
Data type: Enum['stopped','running']
The state that the resolved
service should be in
dns
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
fallback_dns
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
domains
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.
llmnr
Data type: Optional[Variant[Boolean,Enum['resolve']]]
Takes a boolean argument or "resolve".
multicast_dns
Data type: Optional[Variant[Boolean,Enum['resolve']]]
Takes a boolean argument or "resolve".
dnssec
Data type: Optional[Variant[Boolean,Enum['allow-downgrade']]]
Takes a boolean argument or "allow-downgrade".
dnsovertls
Data type: Optional[Variant[Boolean,Enum['opportunistic', 'no']]]
Takes a boolean argument or "opportunistic"
cache
Data type: Boolean
Takes a boolean argument.
dns_stub_listener
Data type: Optional[Variant[Boolean,Enum['udp','tcp']]]
Takes a boolean argument or one of "udp" and "tcp".
use_stub_resolver
Data type: Boolean
Takes a boolean argument. When "false" (default) it uses /var/run/systemd/resolve/resolv.conf as /etc/resolv.conf. When "true", it uses /var/run/systemd/resolve/stub-resolv.conf
manage_networkd
Data type: Boolean
Manage the systemd network daemon
networkd_ensure
Data type: Enum['stopped','running']
The state that the networkd
service should be in
manage_timesyncd
Data type: Boolean
Manage the systemd tiemsyncd daemon
timesyncd_ensure
Data type: Enum['stopped','running']
The state that the timesyncd
service should be in
ntp_server
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
fallback_ntp_server
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
manage_journald
Data type: Boolean
Manage the systemd journald
journald_settings
Data type: Systemd::JournaldSettings
Config Hash that is used to configure settings in journald.conf
manage_logind
Data type: Boolean
Manage the systemd logind
logind_settings
Data type: Systemd::LogindSettings
Config Hash that is used to configure settings in logind.conf
loginctl_users
Data type: Hash
Config Hash that is used to generate instances of our type
loginctl_user
.
Default value: {}
dropin_files
Data type: Hash
Configure dropin files via hiera with factory pattern
Default value: {}
manage_accounting
Data type: Boolean
accounting
Data type: Hash[String,String]
purge_dropin_dirs
Data type: Boolean
systemd::tmpfiles
Update the systemd temp files
- See also
- systemd-tmpfiles(8)
Parameters
The following parameters are available in the systemd::tmpfiles
class.
operations
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']
Defined types
systemd::dropin_file
Creates a drop-in file for a systemd unit
- See also
- systemd.unit(5)
Parameters
The following parameters are available in the systemd::dropin_file
defined type.
unit
Data type: Systemd::Unit
filename
Data type: Systemd::Dropin
Default value: $name
ensure
Data type: Enum['present', 'absent', 'file']
Default value: 'present'
path
Data type: Stdlib::Absolutepath
Default value: '/etc/systemd/system'
selinux_ignore_defaults
Data type: Optional[Boolean]
Default value: false
content
Data type: Optional[Variant[String,Sensitive[String]]]
Default value: undef
source
Data type: Optional[String]
Default value: undef
target
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
owner
Data type: String
Default value: 'root'
group
Data type: String
Default value: 'root'
mode
Data type: String
Default value: '0444'
show_diff
Data type: Boolean
Default value: true
systemd::network
-- Define: systemd::network Creates network config for systemd-networkd
Parameters
The following parameters are available in the systemd::network
defined type.
ensure
Data type: Enum['file', 'absent']
Default value: file
path
Data type: Stdlib::Absolutepath
Default value: '/etc/systemd/network'
content
Data type: Optional[String]
Default value: undef
source
Data type: Optional[String]
Default value: undef
target
Data type: Optional[Stdlib::Absolutepath]
Default value: undef
owner
Data type: String
Default value: 'root'
group
Data type: String
Default value: 'root'
mode
Data type: String
Default value: '0444'
show_diff
Data type: Boolean
Default value: true
restart_service
Data type: Boolean
Default value: true
systemd::service_limits
Adds a set of custom limits to the service
-
Mutually exclusive with
$limits
-
See also
- systemd.exec(5)
Parameters
The following parameters are available in the systemd::service_limits
defined type.
$ensure
Whether to drop a file or remove it
path
Data type: Stdlib::Absolutepath
The path to the main systemd settings directory
Default value: '/etc/systemd/system'
selinux_ignore_defaults
Data type: Optional[Boolean]
If Puppet should ignore the default SELinux labels.
Default value: false
limits
Data type: Optional[Systemd::ServiceLimits]
A Hash of service limits matching the settings in systemd.exec(5)
- Mutually exclusive with
$source
Default value: undef
source
Data type: Optional[String]
A File
resource compatible source
Default value: undef
restart_service
Data type: Boolean
Restart the managed service after setting the limits
Default value: true
ensure
Data type: Enum['present', 'absent', 'file']
Default value: 'present'
systemd::timer
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
Parameters
The following parameters are available in the systemd::timer
defined type.
name
Data type: Pattern['^.+\.timer$]
The target of the timer unit to create
path
Data type: Stdlib::Absolutepath
The main systemd configuration path
Default value: '/etc/systemd/system'
timer_content
Data type: Optional[String[1]]
The full content of the timer unit file
- Mutually exclusive with
$timer_source
Default value: undef
timer_source
Data type: Optional[String[1]]
The File
resource compatible source
- Mutually exclusive with
$timer_content
Default value: undef
service_content
Data type: Optional[String[1]]
The full content of the service unit file
- Mutually exclusive with
$service_source
Default value: undef
service_source
Data type: Optional[String[1]]
The File
resource compatible source
- Mutually exclusive with
$service_content
Default value: undef
owner
Data type: String[1]
The owner to set on the dropin file
Default value: 'root'
group
Data type: String[1]
The group to set on the dropin file
Default value: 'root'
mode
Data type: Stdlib::Filemode
The mode to set on the dropin file
Default value: '0444'
show_diff
Data type: Boolean
Whether to show the diff when updating dropin file
Default value: true
service_unit
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
active
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 explictly stopped and disabled.
Default value: undef
enable
Data type: Optional[Variant[Boolean, Enum['mask']]]
If set, will manage the state of the unit.
Default value: undef
ensure
Data type: Enum['present', 'absent', 'file']
Default value: 'present'
systemd::tmpfile
Creates a systemd tmpfile
-
Mutually exclusive with
$limits
-
See also
- systemd-tmpfiles(8)
Parameters
The following parameters are available in the systemd::tmpfile
defined type.
$ensure
Whether to drop a file or remove it
path
Data type: Stdlib::Absolutepath
The path to the main systemd tmpfiles directory
Default value: '/etc/tmpfiles.d'
content
Data type: Optional[String]
The literal content to write to the file
- Mutually exclusive with
$source
Default value: undef
source
Data type: Optional[String]
A File
resource compatible source
Default value: undef
ensure
Data type: Enum['present', 'absent', 'file']
Default value: 'file'
filename
Data type: Systemd::Dropin
Default value: $name
systemd::unit_file
Creates a systemd unit file
- See also
- systemd.unit(5)
Parameters
The following parameters are available in the systemd::unit_file
defined type.
name
Data type: Pattern['^[^/]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$']
The target unit file to create
ensure
Data type: Enum['present', 'absent', 'file']
The state of the unit file to ensure
Default value: 'present'
path
Data type: Stdlib::Absolutepath
The main systemd configuration path
Default value: '/etc/systemd/system'
content
Data type: Optional[String]
The full content of the unit file
- Mutually exclusive with
$source
Default value: undef
source
Data type: Optional[String]
The File
resource compatible source
- Mutually exclusive with
$content
Default value: undef
target
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
owner
Data type: String
The owner to set on the unit file
Default value: 'root'
group
Data type: String
The group to set on the unit file
Default value: 'root'
mode
Data type: String
The mode to set on the unit file
Default value: '0444'
show_diff
Data type: Boolean
Whether to show the diff when updating unit file
Default value: true
enable
Data type: Optional[Variant[Boolean, Enum['mask']]]
If set, will manage the unit enablement status.
Default value: undef
active
Data type: Optional[Boolean]
If set, will manage the state of the unit.
Default value: undef
Resource types
loginctl_user
An arbitrary name used as the identity of the resource.
Properties
The following properties are available in the loginctl_user
type.
linger
Valid values: enabled
, disabled
Whether linger is enabled for the user.
Default value: disabled
Parameters
The following parameters are available in the loginctl_user
type.
name
namevar
An arbitrary name used as the identity of the resource.
provider
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.
Data types
Systemd::Dropin
The Systemd::Dropin data type.
Alias of Pattern['^[^/]+\.conf$']
Systemd::JournaldSettings
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'], Pattern[/^[0-9]+(K|M|G)?$/],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[Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],Systemd::JournaldSettings::Ensure], Optional['SystemKeepFree'] => Variant[Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],Systemd::JournaldSettings::Ensure], Optional['SystemMaxFileSize'] => Variant[Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],Systemd::JournaldSettings::Ensure], Optional['SystemMaxFiles'] => Variant[Integer[0], Pattern[/^[0-9]+$/],Systemd::JournaldSettings::Ensure], Optional['RuntimeMaxUse'] => Variant[Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],Systemd::JournaldSettings::Ensure], Optional['RuntimeKeepFree'] => Variant[Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],Systemd::JournaldSettings::Ensure], Optional['RuntimeMaxFileSize'] => Variant[Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],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[Pattern[/^[0-9]+(K|M|G|T)?$/],Systemd::JournaldSettings::Ensure], }]
Systemd::JournaldSettings::Ensure
The Systemd::JournaldSettings::Ensure data type.
Alias of Struct[{ 'ensure' => Enum['present','absent'] }]
Systemd::LogindSettings
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[Integer,Pattern['^(\d+(K|M|G|T|P|E|%)?)$'],Systemd::LogindSettings::Ensure], Optional['SessionsMax'] => Variant[Integer,Pattern['^(infinity|(\d+(K|M|G|T|P|E|%)?))$'],Systemd::LogindSettings::Ensure], Optional['SuspendKeyIgnoreInhibited'] => Variant[Enum['yes','no'],Systemd::LogindSettings::Ensure], Optional['UserTasksMax'] => Variant[Integer,Pattern['^(infinity|(\d+(K|M|G|T|P|E|%)?))$'],Systemd::LogindSettings::Ensure] }]
Systemd::LogindSettings::Ensure
The Systemd::LogindSettings::Ensure data type.
Alias of Struct[{ 'ensure' => Enum['present','absent'] }]
Systemd::ServiceLimits
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'] => Integer[1], 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['^(\d+(K|M|G|T)?)$'], Optional['MemoryHigh'] => Pattern['^(\d+(K|M|G|T)?)$'], Optional['MemoryMax'] => Pattern['^(\d+(K|M|G|T)?)$'], Optional['MemoryLimit'] => Pattern['^(\d+(K|M|G|T)?)$'], 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] }]
Systemd::Unit
The Systemd::Unit data type.
Alias of Pattern['^[^/]+\.(service|socket|device|mount|automount|swap|target|path|timer|slice|scope)$']
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
3.0.0 (2021-04-16)
Breaking changes:
Implemented enhancements:
- add ubuntu2004 #187 (GervaisdeM)
- allow Puppet 7 and add to Travis testing; remove Puppet 5 from Travis testing #183 (kenyon)
- metadata: allow stdlib 7.0.0 and inifile 5.0.0 #182 (kenyon)
Closed issues:
- Static units cannot be enabled #180
- Cyclic dependency error when using systemd::unit_file in multiple classes #178
Merged pull requests:
2.12.0 (2021-02-10)
Added
- Allow service reloading #159 #175 (k0ka)
- Allow additional option for $cache parameter #169 (bryangwilliam)
- Add management of udev objects #165 (jcpunk)
2.11.0 (2021-01-19)
Added
- Permit using arrays to make extending lists easier #164 (jcpunk)
- Add parameter for ENCs to make loginctl_users easily #163 (jcpunk)
- Add ability to specify supported option 'infinity' for LimitNPROC #152 (hdeheer)
Fixed
2.10.0 (2020-08-21)
Added
- Fix typo in parameter name in class documentation #156 (ekohl)
- Readme formatting #154 (kenyon)
- Add selinux_ignore_defaults support to dropin_file and service_limits #151 (tobias-urdin)
- pdk update #150 (TheMeier)
- add factory for dropin files #149 (TheMeier)
Fixed
2.9.0 (2020-03-11)
Added
- Add EL8 Support #144 (trevor-vaughan)
- Add Fedora 30/31 compatibility #141 (bastelfreak)
- New systemd::timer define type #138 (mmoll)
- Add SLES 12/15 support #137 (msurato)
Fixed
- fix Issue 113 #140 (schlitzered)
2.8.0 (2020-01-08)
Added
- Rubocop #135 (raphink)
- Convert to PDK #132 (raphink)
- Add loginctl_user type/provider #131 (raphink)
- Update types to avoid / in unit or drop file name #130 (traylenator)
- Force tmpfiles.d drop file to end in .conf #129 (traylenator)
- Add OOMScoreAdjust to Systemd::ServiceLimits type #128 (jlutran)
- allow puppetlabs/inifile 4.x #126 (bastelfreak)
Fixed
2.7.0 (2019-10-29)
Added
- add support for 'VirtuozzoLinux 7' #121 (kBite)
- Manage logind service and configuration #120 (fraenki)
- allow Sensitive type for content param #115 (TheMeier)
Fixed
2.6.0 (2019-06-17)
Added
- Allow for lazy/eager systemctl daemon reloading #111 (JohnLyman)
- Remove stray
v
from Changelogconfig.future_release
#110 (alexjfisher)
2.5.1 (2019-05-29)
Added
- Pin
public_suffix
to3.0.3
on rvm 2.1.9 builds #108 (alexjfisher) - run CI jobs on xenial instead of trusty #107 (bastelfreak)
2.5.0 (2019-05-29)
Added
- Allow
puppetlabs/stdlib
6.x #103 (alexjfisher)
2.4.0 (2019-04-29)
Added
- Allow
puppetlabs/inifile
3.x #101 (alexjfisher)
2.3.0 (2019-04-10)
Added
2.2.0 (2019-02-25)
Added
- Puppet 6 support #96 (ekohl)
- Allow specifying owner/group/mode/show_diff #94 (simondeziel)
- Manage journald service and configuration #89 (treydock)
- Add support for DNSoverTLS #88 (shibumi)
- unit.d directory should be purged of unmanaged dropin files #41 (treydock)
- Add Journald support #14 (duritong)
2.1.0 (2018-08-31)
Added
- do not access facts as top scope variable #85 (bastelfreak)
- allow puppetlabs/stdlib 5.x #83 (bastelfreak)
- Modify service limit type #81 (bastelfreak)
- Add parameter to select resolver #79 (amateo)
- Fix CHANGELOG.md duplicate footer #78 (alexjfisher)
Fixed
2.0.0 (2018-07-11)
Changed
- move params to data-in-modules #67 (bastelfreak)
Added
- add ubuntu 18.04 support #72 (bastelfreak)
- bump facter to latest 2.x version #71 (bastelfreak)
- Add enable and active parameters to unit_file #69 (jcharaoui)
- Update the documentation of facts #68 (ekohl)
- purge legacy puppet-lint checks #66 (bastelfreak)
- Add support for Resource Accounting via systemd #65 (bastelfreak)
- Reuse the systemd::dropin_file in service_limits #61 (ekohl)
- Allow resolved class to configure DNS settings #59 (hfm)
- Replace iterator with stdlib function #58 (jfleury-at-ovh)
- implement github changelog generator #45 (bastelfreak)
Fixed
- fix puppet-linter warnings in README.md #75 (bastelfreak)
1.1.1 (2017-11-29)
Added
- Clean up test tooling #54 (ekohl)
- Correct parameter documentation #53 (ekohl)
- Use a space-separated in timesyncd.conf #50 (hfm)
- Use the same systemd drop-in file for different units #46 (countsudoku)
Fixed
1.1.0 (2017-10-24)
Added
- Add systemd-timesyncd support #43 (bastelfreak)
- Reuse the service_provider fact from stdlib #42 (ekohl)
- (doc) Adds examples of running the service created #29 (petems)
- Quote hash keys in example of service limits #20 (stbenjam)
1.0.0 (2017-09-04)
Added
- Add support for drop-in files #39 (countsudoku)
- Adds control group limits to ServiceLimits #36 (trevor-vaughan)
- General cleanup + add Puppet4 datatypes #32 (bastelfreak)
- add management for systemd-resolved #31 (bastelfreak)
- Add a network defined resource #30 (bastelfreak)
- Add seltype to systemd directory #27 (petems)
- Add MemoryLimit to limits template #23 (pkilambi)
- Update to support Puppet 4 #18 (trevor-vaughan)
- Manage resource limits of services #13 (ruriky)
- Refactor systemd facts #12 (petems)
Fixed
0.4.0 (2016-08-18)
Added
- Add target param for the unit file #10 (tampakrap)
- only use awk, instead of grep and awk #9 (igalic)
0.3.0 (2016-05-16)
Implemented enhancements:
- Shortcut for creating unit files / tmpfiles #4 (felixb)
- Add systemd facts #6 (roidelapluie)
0.2.2 (2015-08-25)
Implemented enhancements:
- Add 'systemd-tmpfiles-create' #1 (roidelapluie)
0.2.1 (2015-08-21)
- Use docker for acceptance tests
0.1.15 (2015-06-26)
- Fix strict_variables activation with rspec-puppet 2.2
0.1.14 (2015-05-28)
- Add beaker_spec_helper to Gemfile
0.1.13 (2015-05-26)
- Use random application order in nodeset
0.1.12 (2015-05-26)
- Add utopic & vivid nodesets
0.1.11 (2015-05-25)
- Don't allow failure on Puppet 4
0.1.10 (2015-05-13)
- Add puppet-lint-file_source_rights-check gem
0.1.9 (2015-05-12)
- Don't pin beaker
0.1.8 (2015-04-27)
- Add nodeset ubuntu-12.04-x86_64-openstack
0.1.7 (2015-04-03)
- Confine rspec pinning to ruby 1.8
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.13.1 < 8.0.0)
- puppetlabs/inifile (>= 1.6.0 < 6.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.