1 # This module allows triggering systemd commands once for all modules
5 # @param service_limits
6 # May be passed a resource hash suitable for passing directly into the
7 # ``create_resources()`` function as called on ``systemd::service_limits``
9 # @param manage_resolved
10 # Manage the systemd resolver
12 # @param resolved_ensure
13 # The state that the ``resolved`` service should be in
16 # A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers.
17 # DNS requests are sent to one of the listed DNS servers in parallel to suitable
18 # per-link DNS servers acquired from systemd-networkd.service(8) or set at runtime
19 # by external applications. requires puppetlabs-inifile
22 # A space-separated list of IPv4 and IPv6 addresses to use as the fallback DNS
23 # servers. Any per-link DNS servers obtained from systemd-networkd take
24 # precedence over this setting. requires puppetlabs-inifile
27 # A space-separated list of domains host names or IP addresses to be used
28 # systemd-resolved take precedence over this setting.
31 # Takes a boolean argument or "resolve".
33 # @param multicast_dns
34 # Takes a boolean argument or "resolve".
37 # Takes a boolean argument or "allow-downgrade".
40 # Takes a boolean argument.
42 # @param dns_stub_listener
43 # Takes a boolean argument or one of "udp" and "tcp".
45 # @param use_stub_resolver
46 # Takes a boolean argument. When "false" (default) it uses /var/run/systemd/resolve/resolv.conf
47 # as /etc/resolv.conf. When "true", it uses /var/run/systemd/resolve/stub-resolv.conf
48 # @param manage_networkd
49 # Manage the systemd network daemon
51 # @param networkd_ensure
52 # The state that the ``networkd`` service should be in
54 # @param manage_timesyncd
55 # Manage the systemd tiemsyncd daemon
57 # @param timesyncd_ensure
58 # The state that the ``timesyncd`` service should be in
61 # comma separated list of ntp servers, will be combined with interface specific
62 # addresses from systemd-networkd. requires puppetlabs-inifile
64 # @param fallback_ntp_server
65 # A space-separated list of NTP server host names or IP addresses to be used
66 # as the fallback NTP servers. Any per-interface NTP servers obtained from
67 # systemd-networkd take precedence over this setting. requires puppetlabs-inifile
69 Hash[String,Hash[String, Any]] $service_limits,
70 Boolean $manage_resolved,
71 Enum['stopped','running'] $resolved_ensure,
72 Optional[Variant[Array[String],String]] $dns,
73 Optional[Variant[Array[String],String]] $fallback_dns,
74 Optional[Variant[Array[String],String]] $domains,
75 Optional[Variant[Boolean,Enum['resolve']]] $llmnr,
76 Optional[Variant[Boolean,Enum['resolve']]] $multicast_dns,
77 Optional[Variant[Boolean,Enum['allow-downgrade']]] $dnssec,
79 Optional[Variant[Boolean,Enum['udp','tcp']]] $dns_stub_listener,
80 Boolean $use_stub_resolver,
81 Boolean $manage_networkd,
82 Enum['stopped','running'] $networkd_ensure,
83 Boolean $manage_timesyncd,
84 Enum['stopped','running'] $timesyncd_ensure,
85 Optional[Variant[Array,String]] $ntp_server,
86 Optional[Variant[Array,String]] $fallback_ntp_server,
87 Boolean $manage_accounting,
88 Hash[String,String] $accounting,
91 contain systemd::systemctl::daemon_reload
93 create_resources('systemd::service_limits', $service_limits)
95 if $manage_resolved and $facts['systemd_internal_services'] and $facts['systemd_internal_services']['systemd-resolved.service'] {
96 contain systemd::resolved
99 if $manage_networkd and $facts['systemd_internal_services'] and $facts['systemd_internal_services']['systemd-networkd.service'] {
100 contain systemd::networkd
103 if $manage_timesyncd and $facts['systemd_internal_services'] and $facts['systemd_internal_services']['systemd-timesyncd.service'] {
104 contain systemd::timesyncd
107 if $manage_accounting {
108 contain systemd::system