Skip to content

dns_stub_listener cannot be set to "no" #537

@DaAwesomeP

Description

@DaAwesomeP

Hello,

When setting dns_stub_listener to false, it does not cause DNSStubListener to be set to no. This is an issue for systems where DNSStubListener is yes by default.

I believe this is because the code below is checking if $dns_stub_listener is a String, but it should maybe be checking $_dns_stub_listener instead?

Optional[Variant[Boolean,Enum['udp', 'tcp','absent']]] $dns_stub_listener = $systemd::dns_stub_listener,

$_dns_stub_listener = $dns_stub_listener ? {
true => 'yes',
false => 'no',
default => $dns_stub_listener,
}
if $dns_stub_listener =~ String[1] {
ini_setting { 'dns_stub_listener':
ensure => stdlib::ensure($dns_stub_listener != 'absent'),
value => $_dns_stub_listener,
setting => 'DNSStubListener',
section => 'Resolve',
path => '/etc/systemd/resolved.conf',
notify => Service['systemd-resolved'],
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions