19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'modules/systemd/manifests/resolved.pp', line 19
class systemd::resolved (
Wmflib::Ensure $ensure = 'present',
Array[Stdlib::IP::Address] $dns = [],
Array[Stdlib::IP::Address] $fallback_dns = [],
Array[String] $domains = [],
Variant[Enum['resolve'], Boolean] $enable_llmnr = false,
Variant[Enum['resolve'], Boolean] $enable_mdns = false,
Variant[Enum['allow-downgrade'], Boolean] $dnssec = 'allow-downgrade',
Variant[Enum['opportunistic'], Boolean ] $enable_dtls = false,
Variant[Enum['no-negative'], Boolean] $enable_cache = true,
Variant[Enum['tcp', 'udp'], Boolean] $dns_stub_listener = true,
Boolean $read_etc_hosts = true,
Boolean $link_resolv_conf = true,
) {
$enable = $ensure ? {
'absent' => false,
default => true,
}
file{'/etc/resolv.conf':
ensure => stdlib::ensure($link_resolv_conf, 'link'),
target => '/run/systemd/resolve/stub-resolv.conf',
}
file {'/etc/systemd/resolved.conf':
ensure => file,
content => template('systemd/resolved.conf.erb'),
notify => Service['systemd-resolved'],
}
service { 'systemd-resolved':
ensure => stdlib::ensure($ensure, 'service'),
enable => $enable,
}
}
|