Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/resolved.pp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
# Debian 13 started disabling mDNS by default, so we need to override that
# if we want to manage mDNS. See https://bugs.debian.org/1098914 and
# https://salsa.debian.org/systemd-team/systemd/-/commit/46432631232015b78071f84e5a3fb944621c83f7
if stdlib::os_version_gte('Debian', '13') {
if stdlib::os_version_gte('Debian', '13') or stdlib::os_version_gte('Ubuntu', '26') {
file { '/etc/systemd/resolved.conf.d':
ensure => directory,
owner => 'root',
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"name": "puppet-systemd",
"version": "9.4.1-rc0",
Expand Down Expand Up @@ -31,7 +31,8 @@
"operatingsystemrelease": [
"20.04",
"22.04",
"24.04"
"24.04",
"26.04"
]
},
{
Expand Down
11 changes: 7 additions & 4 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,22 +266,25 @@
)
end

context 'on Debian 13 or newer', if: facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'].to_i >= 13 do
case [facts[:os]['name'], facts[:os]['release']['major']]
when %w[Debian 13], ['Ubuntu', '26.04'] # switch to family case once old debian, ubuntu gone
it do
is_expected.to contain_file('/etc/systemd/resolved.conf.d').with(
ensure: 'directory',
owner: 'root',
group: 'root',
mode: '0755',
)
end

it do
is_expected.to contain_file('/etc/systemd/resolved.conf.d/00-disable-mdns.conf').with(
ensure: 'link',
target: '/dev/null',
).that_notifies('Service[systemd-resolved]')
end
else
it do
is_expected.not_to contain_file('/etc/systemd/resolved.conf.d')
is_expected.not_to contain_file('/etc/systemd/resolved.conf.d/00-disable-mdns.conf')
end
end
end

Expand Down
Loading