Showing with 31 additions and 7 deletions.
  1. +10 −1 CHANGELOG.md
  2. +4 −1 manifests/params.pp
  3. +4 −3 metadata.json
  4. +13 −2 spec/classes/dns_init_spec.rb
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog

## [9.5.1](https://github.com/theforeman/puppet-dns/tree/9.5.1) (2023-01-31)
## [9.6.0](https://github.com/theforeman/puppet-dns/tree/9.6.0) (2023-05-03)

[Full Changelog](https://github.com/theforeman/puppet-dns/compare/9.5.1...9.6.0)

**Implemented enhancements:**

- Mark compatible with puppetlabs/concat 8.x [\#230](https://github.com/theforeman/puppet-dns/pull/230) ([ekohl](https://github.com/ekohl))
- Add support for Ubuntu Jammy \(22.04\) [\#228](https://github.com/theforeman/puppet-dns/pull/228) ([kajinamit](https://github.com/kajinamit))

## [9.5.1](https://github.com/theforeman/puppet-dns/tree/9.5.1) (2023-02-02)

[Full Changelog](https://github.com/theforeman/puppet-dns/compare/9.5.0...9.5.1)

Expand Down
5 changes: 4 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
$user = 'bind'
$group = 'bind'
$rndcconfgen = '/usr/sbin/rndc-confgen'
$named_checkconf = '/usr/sbin/named-checkconf'
$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',
}
$sysconfig_file = '/etc/default/bind9'
$sysconfig_template = "dns/sysconfig.${facts['os']['family']}.erb"
$sysconfig_startup_options = '-u bind'
Expand Down
7 changes: 4 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-dns",
"version": "9.5.1",
"version": "9.6.0",
"author": "theforeman",
"summary": "Manage the ISC BIND daemon",
"license": "Apache-2.0",
Expand All @@ -18,7 +18,7 @@
"dependencies": [
{
"name": "puppetlabs/concat",
"version_requirement": ">= 4.1.0 < 8.0.0"
"version_requirement": ">= 4.1.0 < 9.0.0"
},
{
"name": "puppetlabs/stdlib",
Expand Down Expand Up @@ -71,7 +71,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04",
"20.04"
"20.04",
"22.04"
]
},
{
Expand Down
15 changes: 13 additions & 2 deletions spec/classes/dns_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@

let(:sbin) { facts[:os]['family'] == 'FreeBSD' ? '/usr/local/sbin' : '/usr/sbin' }

let(:checkconf) {
case facts[:os]['family']
when 'Debian'
['22.04'].include?(facts[:os]['release']['major']) ? "/usr/bin/named-checkconf" : "/usr/sbin/named-checkconf"
when 'FreeBSD'
'/usr/local/sbin/named-checkconf'
else
'/usr/sbin/named-checkconf'
end
}

let(:etc_named_directory) do
case facts[:os]['family']
when 'Debian'
Expand Down Expand Up @@ -134,8 +145,8 @@
verify_concat_fragment_exact_contents(catalogue, 'options.conf+10-main.dns', expected)
end

it { should contain_concat("#{etc_named_directory}/zones.conf").with_validate_cmd("#{sbin}/named-checkconf %") }
it { should contain_concat("#{etc_directory}/named.conf").with_validate_cmd("#{sbin}/named-checkconf %") }
it { should contain_concat("#{etc_named_directory}/zones.conf").with_validate_cmd("#{checkconf} %") }
it { should contain_concat("#{etc_directory}/named.conf").with_validate_cmd("#{checkconf} %") }
it do
expected = [
'// named.conf',
Expand Down