Files
puppet-designate/manifests/backend/pdns4.pp
Takashi Kajinami 8f560f1de1 Prepare for voxpupuli-puppet-lint-plugins
Fix new lint errors detected when full of the voxpupili lint plugins
are enabled.

Change-Id: I9705ad334d05a2041f0f9c4b885fc3fd44342720
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-20 00:39:05 +09:00

79 lines
2.2 KiB
Puppet

# == Class designate::backend::pdns4
#
# Configure PowerDNS 4 as backend
#
# == Parameters
#
# [*api_token*]
# (Required) Token string to authenticate with the PowerDNS Authoritative
# Server.
#
# [*pdns4_hosts*]
# (Optional) Host running DNS service.
# Defaults to ['127.0.0,1'].
#
# [*pdns4_port*]
# (Optional) TCP port to connect to DNS service.
# Defaults to 53.
#
# [*mdns_hosts*]
# (Optional) Array of hosts where designate-mdns service is running.
# Defaults to ['127.0.0.1'].
#
# [*mdns_port*]
# (Optional) TCP Port to connect to designate-mdns service.
# Defaults to 5354.
#
# [*api_endpoint*]
# (Optional) URL to access the PowerDNS Authoritative Server.
# Defaults to 'http://127.0.0.1:8081'.
#
# [*tsigkey_name*]
# (Optional) Name of TSIGKey.
# Defaults to undef.
#
# [*also_notifies*]
# (Optional) Array of hosts for which designate-mdns will send DNS notify
# packets to.
# Defaults to [].
#
# [*attributes*]
# (Optional) Pool attribtes used by scheduling.
# Defaults to {}
#
class designate::backend::pdns4 (
String[1] $api_token,
Array[String[1], 1] $pdns4_hosts = ['127.0.0.1'],
$pdns4_port = 53,
Array[String[1], 1] $mdns_hosts = ['127.0.0.1'],
$mdns_port = 5354,
String[1] $api_endpoint = 'http://127.0.0.1:8081',
Optional[String[1]] $tsigkey_name = undef,
Array[String[1]] $also_notifies = [],
Hash[String[1], String[1]] $attributes = {},
) {
include designate::deps
include designate::params
file { '/etc/designate/pools.yaml':
ensure => file,
path => '/etc/designate/pools.yaml',
owner => $designate::params::user,
group => $designate::params::group,
mode => '0640',
content => template('designate/pdns4-pools.yaml.erb'),
show_diff => false,
require => Anchor['designate::config::begin'],
before => Anchor['designate::config::end'],
}
exec { 'designate-manage pool update':
command => 'designate-manage pool update',
path => '/usr/bin',
user => $designate::params::user,
refreshonly => true,
require => Anchor['designate::service::end'],
subscribe => File['/etc/designate/pools.yaml'],
}
}