Skip to content

Commit f2d2353

Browse files
authored
Add support for latest recursor releases (#138)
* bump recursor default series to 52
1 parent 325d897 commit f2d2353

File tree

16 files changed

+60
-72
lines changed

16 files changed

+60
-72
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright (c) 2014-2023 DNSimple Corporation
189+
Copyright (c) 2014-2025 DNSimple Corporation
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -246,38 +246,38 @@ end
246246

247247
### pdns_recursor_install
248248

249-
Installs PowerDNS recursor 4.8.x series using PowerDNS official repository in the supported platforms.
249+
Installs PowerDNS recursor 5.2.x series using PowerDNS official repository in the supported platforms.
250250

251251
#### pdns_recursor_install Properties
252252

253253
| Name | Type | Default value |
254254
|----------------|-------------|-----------------|
255255
| version | String | '' |
256-
| series | String | '48' |
256+
| series | String | '52' |
257257
| debug | true, false | false |
258258
| allow_upgrade | true, false | false |
259259

260260
#### pdns_recursor_install Usage examples
261261

262-
Install the latest 5.0.x release PowerDNS recursor
262+
Install the latest 5.2.x release PowerDNS recursor
263263

264264
```ruby
265-
pdns_recursor_install 'latest_5_0_x_recursor'
265+
pdns_recursor_install 'latest_5_2_x_recursor'
266266
```
267267

268-
Install the latest 4.9.x release PowerDNS recursor
268+
Install the latest 5.1.x release PowerDNS recursor
269269

270270
```ruby
271271
pdns_recursor_install 'my_recursor' do
272-
series '49'
272+
series '51'
273273
end
274274
```
275275

276-
Install and upgrade to the latest 5.0.x PowerDNS recursor release
276+
Install and upgrade to the latest 5.2.x PowerDNS recursor release
277277

278278
```ruby
279279
pdns_recursor_install 'my_recursor' do
280-
series '50'
280+
series '52'
281281
allow_upgrade true
282282
end
283283
```
@@ -293,16 +293,13 @@ Creates a PowerDNS recursor configuration.
293293
| instance_name | String | name_property | Yes |
294294
| cookbook | String,nil | 'pdns' | No |
295295
| config_dir | String | see `default_recursor_config_directory` helper method | Yes |
296-
| socket_dir | String | "/var/run/#{resource.instance_name}" | Yes |
296+
| run_user | String | see `default_recursor_run_user` helper method | Yes |
297297
| source | String,nil | 'recursor.conf.erb' | No |
298-
| variables | Hash | {} | No |
299298
| virtual | Boolean | false | No |
300299

301300
- `cookbook` : Cookbook for a custom configuration template.
302301
- `config_dir` : Path of the recursor configuration directory.
303-
- `socket_dir` : Directory where sockets are created.
304302
- `source` : Name of the recursor custom template.
305-
- `variables`: Variables for the configuration template.
306303
- `virtual` : Is this a virtual instance or the default?
307304

308305
### pdns_recursor_service
@@ -329,34 +326,24 @@ pdns_recursor_service 'default' do
329326
end
330327
```
331328

332-
Configure a virtual PowerDNS recursor service instance named 'my_recursor' in your wrapper cookbook for Acme Corp with a custom template named `my-recursor.erb`
329+
Configure a virtual PowerDNS recursor service instance named 'my_recursor' in your wrapper cookbook for Acme Corp with a custom template named `my-virtual-recursor.erb`
333330

334331
```ruby
335332
pdns_recursor_service 'my_recursor' do
336333
virtual true
337-
source 'my-recursor.erb'
334+
source 'my-virtual-recursor.erb'
338335
cookbook 'acme-pdns-recursor'
339336
end
340337
```
341338

342-
##### Customize the default recursor installation and change it's port to 54
343-
344-
```ruby
345-
pdns_recursor_config 'default' do
346-
variables(
347-
'local-port' => '54'
348-
)
349-
end
350-
```
339+
##### Customize the default recursor installation
351340

352341
Create a PowerDNS recursor configuration named 'my_recursor' in your wrapper cookbook for Acme Corp which uses a custom template named `my-recursor.erb` and a few attributes:
353342

354343
```ruby
355344
pdns_recursor_config 'my_recursor' do
356-
virtual true
357345
source 'my-recursor.erb'
358346
cookbook 'acme-pdns-recursor'
359-
variables(client-tcp-timeout: '20', loglevel: '5', network-timeout: '2000')
360347
end
361348
```
362349

libraries/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook:: pdns
33
# Libraries:: helpers
44
#
5-
# # Copyright:: 2023, DNSimple Corp.
5+
# # Copyright:: 2025, DNSimple Corp.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.

metadata.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
source_url 'https://github.com/dnsimple/chef-pdns'
88
issues_url 'https://github.com/dnsimple/chef-pdns/issues'
99

10-
chef_version '>= 15'
10+
chef_version '>= 18'
1111

1212
supports 'ubuntu', '>= 22.04'
1313
supports 'debian', '>= 11.0'
14-
supports 'centos', '>= 7.0'
14+
supports 'centos', '>= 9.0'

resources/authoritative_config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook:: pdns
33
# Resources:: pdns_authoritative_config
44
#
5-
# # Copyright:: 2023, DNSimple Corp.
5+
# # Copyright:: 2025, DNSimple Corp.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.

resources/authoritative_install_debian.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook:: pdns
33
# Resources:: pdns_authoritative_install_debian
44
#
5-
# # Copyright:: 2023, DNSimple Corp.
5+
# # Copyright:: 2025, DNSimple Corp.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@
3838
distribution "#{node['lsb']['codename']}-auth-#{new_resource.series}"
3939
components ['main']
4040
key 'powerdns.asc'
41+
signed_by true
4142
cookbook 'pdns'
4243
end
4344

resources/authoritative_install_rhel.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook:: pdns
33
# Resources:: pdns_authoritative_install_rhel
44
#
5-
# # Copyright:: 2023, DNSimple Corp.
5+
# # Copyright:: 2025, DNSimple Corp.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.

resources/authoritative_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook:: pdns
33
# Resources:: pdns_authoritative_service
44
#
5-
# # Copyright:: 2023, DNSimple Corp.
5+
# # Copyright:: 2025, DNSimple Corp.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.

resources/recursor_config.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook:: pdns
33
# Resources:: pdns_recursor_config
44
#
5-
# # Copyright:: 2023, DNSimple Corp.
5+
# # Copyright:: 2025, DNSimple Corp.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -37,11 +37,10 @@
3737
}
3838
property :virtual, [true, false], default: false
3939
property :config_dir, String, default: lazy { default_recursor_config_directory }
40-
property :socket_dir, String, default: '/var/run/pdns-recursor'
40+
property :run_user, String, default: lazy { default_recursor_run_user }
4141

4242
property :source, String, default: 'recursor.conf.erb'
4343
property :cookbook, String, default: 'pdns'
44-
property :variables, Hash, default: {}
4544

4645
action :create do
4746
user 'pdns recursor' do
@@ -74,8 +73,8 @@
7473
group lazy { default_recursor_run_user }
7574
mode '0640'
7675
variables(
77-
socket_dir: "#{recursor_socket_directory(new_resource.instance_name, new_resource.socket_dir, new_resource.virtual)}",
78-
variables: new_resource.variables
76+
config_dir: new_resource.config_dir,
77+
run_user: new_resource.run_user
7978
)
8079
end
8180
end

resources/recursor_install_debian.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Cookbook:: pdns
33
# Resources:: pdns_recursor_install
44
#
5-
# # Copyright:: 2023, DNSimple Corp.
5+
# # Copyright:: 2025, DNSimple Corp.
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
88
# you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
2626
node['platform_version'].to_i >= 9
2727
end
2828

29-
property :series, String, default: '50'
29+
property :series, String, default: '52'
3030
property :version, String
3131
property :debug, [true, false], default: false
3232
property :allow_upgrade, [true, false], default: false

0 commit comments

Comments
 (0)