Skip to content

Commit

Permalink
Update manifests/init.pp
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Meusel <[email protected]>
  • Loading branch information
TheMeier and bastelfreak committed Mar 12, 2024
1 parent bf96af3 commit 6d83293
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@
#
# @param dns_stub_listener
# Takes a boolean argument or one of "udp" and "tcp".
# Setting it to `'absent'` will remove `DNSStubListener` existing entries from the configuration file-
# Setting it to `'absent'` will remove `DNSStubListener` existing entries from the configuration file
#
# @param dns_stub_listener_extra
# Additional addresses for the DNS stub listener to listen on
# Setting it to `['absent']` will remove `DNSStubListenerExtra` existing entries from the configuration file-
# Setting it to `'absent'` will remove `DNSStubListenerExtra` existing entries from the configuration file
#
# @param manage_resolv_conf
# For when `manage_resolved` is `true` should the file `/etc/resolv.conf` be managed.
Expand Down Expand Up @@ -206,8 +206,8 @@
Optional[Variant[Boolean,Enum['allow-downgrade']]] $dnssec = undef,
Variant[Boolean,Enum['yes', 'opportunistic', 'no']] $dnsovertls = false,
Optional[Variant[Boolean,Enum['no-negative']]] $cache = undef,
Optional[Variant[Boolean,Enum['udp','tcp','absent']]] $dns_stub_listener = undef,
Optional[Array[String[1]]] $dns_stub_listener_extra = undef,
Optional[Variant[Boolean,Enum['udp','tcp','absent']]] $dns_stub_listener = undef,
Optional[Variant[Array[String[1]],Enum['absent']]] $dns_stub_listener_extra = undef,
Boolean $manage_resolv_conf = true,
Boolean $use_stub_resolver = false,
Boolean $manage_networkd = false,
Expand Down
4 changes: 2 additions & 2 deletions manifests/resolved.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
Optional[Variant[Boolean,Enum['yes', 'opportunistic', 'no']]] $dnsovertls = $systemd::dnsovertls,
Optional[Variant[Boolean,Enum['no-negative']]] $cache = $systemd::cache,
Optional[Variant[Boolean,Enum['udp', 'tcp','absent']]] $dns_stub_listener = $systemd::dns_stub_listener,
Optional[Array[String[1]]] $dns_stub_listener_extra = $systemd::dns_stub_listener_extra,
Optional[Variant[Array[String[1]],Enum['absent']]] $dns_stub_listener_extra = $systemd::dns_stub_listener_extra,
Boolean $use_stub_resolver = $systemd::use_stub_resolver,
) {
assert_private()
Expand Down Expand Up @@ -252,7 +252,7 @@

if $dns_stub_listener_extra =~ NotUndef {
ini_setting { 'dns_stub_listener_extra':
ensure => stdlib::ensure($dns_stub_listener_extra[0] != 'absent'),
ensure => stdlib::ensure($dns_stub_listener_extra != 'absent'),
value => $dns_stub_listener_extra,
setting => 'DNSStubListenerExtra',
section => 'Resolve',
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
manage_resolved: true,
dns: ['8.8.8.8', '8.8.4.4'],
fallback_dns: ['2001:4860:4860::8888', '2001:4860:4860::8844'],
dns_stub_listener_extra: ['absent']
dns_stub_listener_extra: 'absent'
}
end

Expand Down

0 comments on commit 6d83293

Please sign in to comment.