Skip to content

Commit

Permalink
Add Debian 12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak authored and ekohl committed Nov 14, 2023
1 parent 377fa70 commit c740d3d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$rndcconfgen = '/usr/sbin/rndc-confgen'
$named_checkconf = $facts['os']['name'] ? {
'Ubuntu' => if versioncmp($facts['os']['release']['major'], '22.04') >= 0 { '/usr/bin/named-checkconf' } else { '/usr/sbin/named-checkconf' },
default => '/usr/sbin/named-checkconf',
default => if versioncmp($facts['os']['release']['major'], '12') >= 0 { '/usr/bin/named-checkconf' } else { '/usr/sbin/named-checkconf' },
}
$sysconfig_file = $facts['os']['name'] ? {
'Debian' => if versioncmp($facts['os']['release']['major'], '11') >= 0 { '/etc/default/named' } else { '/etc/default/bind9' },
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
"11",
"12"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/dns_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
let(:checkconf) {
case facts[:os]['family']
when 'Debian'
['22.04'].include?(facts[:os]['release']['major']) ? "/usr/bin/named-checkconf" : "/usr/sbin/named-checkconf"
['22.04', '12'].include?(facts[:os]['release']['major']) ? "/usr/bin/named-checkconf" : "/usr/sbin/named-checkconf"
when 'FreeBSD'
'/usr/local/sbin/named-checkconf'
else
Expand Down

0 comments on commit c740d3d

Please sign in to comment.