Skip to content

dns_stub_listener cannot be set to "no" #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DaAwesomeP opened this issue Jun 3, 2025 · 1 comment
Open

dns_stub_listener cannot be set to "no" #537

DaAwesomeP opened this issue Jun 3, 2025 · 1 comment

Comments

@DaAwesomeP
Copy link

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'],
}
}

@ekohl
Copy link
Member

ekohl commented Jun 4, 2025

I think you're right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants