Skip to content

Commit da4d7d7

Browse files
authored
Merge pull request #619 from traylenator/26
Support Ubuntu 26.06
2 parents aa86203 + 66a1e74 commit da4d7d7

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

manifests/resolved.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
# Debian 13 started disabling mDNS by default, so we need to override that
203203
# if we want to manage mDNS. See https://bugs.debian.org/1098914 and
204204
# https://salsa.debian.org/systemd-team/systemd/-/commit/46432631232015b78071f84e5a3fb944621c83f7
205-
if stdlib::os_version_gte('Debian', '13') {
205+
if stdlib::os_version_gte('Debian', '13') or stdlib::os_version_gte('Ubuntu', '26') {
206206
file { '/etc/systemd/resolved.conf.d':
207207
ensure => directory,
208208
owner => 'root',

metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"operatingsystemrelease": [
3232
"20.04",
3333
"22.04",
34-
"24.04"
34+
"24.04",
35+
"26.04"
3536
]
3637
},
3738
{

spec/classes/init_spec.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,22 +266,25 @@
266266
)
267267
end
268268

269-
context 'on Debian 13 or newer', if: facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'].to_i >= 13 do
269+
case [facts[:os]['name'], facts[:os]['release']['major']]
270+
when %w[Debian 13], ['Ubuntu', '26.04'] # switch to family case once old debian, ubuntu gone
270271
it do
271272
is_expected.to contain_file('/etc/systemd/resolved.conf.d').with(
272273
ensure: 'directory',
273274
owner: 'root',
274275
group: 'root',
275276
mode: '0755',
276277
)
277-
end
278-
279-
it do
280278
is_expected.to contain_file('/etc/systemd/resolved.conf.d/00-disable-mdns.conf').with(
281279
ensure: 'link',
282280
target: '/dev/null',
283281
).that_notifies('Service[systemd-resolved]')
284282
end
283+
else
284+
it do
285+
is_expected.not_to contain_file('/etc/systemd/resolved.conf.d')
286+
is_expected.not_to contain_file('/etc/systemd/resolved.conf.d/00-disable-mdns.conf')
287+
end
285288
end
286289
end
287290

0 commit comments

Comments
 (0)