puppet-designate/manifests/pool_target.pp
Takashi Kajinami 8ed0bcb867 replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Note that this change looses validation about pool ids. Alternatively
we can define a new data type to keep the validation, but these defined
types for pool-manager were already deprecated and useless and will be
removed in a near future release so we avoid that redundant step.

Change-Id: I85d7058bf379c6aa0e787b2f806f14aebf0693d3
2023-06-19 17:27:32 +09:00

43 lines
1.2 KiB
Puppet

# == Define: designate::pool_target
#
# Configure a target for the Designate Pool Manager.
#
# == Parameters
#
# [*options*]
# (required) Options to be passed to the backend DNS server. This should
# include host and port. For instance for a bind9 target this could be:
# {'rndc_host' => '192.168.27.100',
# 'rndc_port' => 953,
# 'rndc_config_file' => '/etc/bind/rndc.conf',
# 'rndc_key_file' => '/etc/bind/rndc.key',
# 'port' => 53,
# 'host' => '192.168.27.100'}
#
# [*type*]
# (required) Port number of the target DNS server.
#
# [*masters*]
# (optional) IP addresses and ports of the master DNS server. This should point
# to the Designate mDNS servers and ports.
# Defaults to ['127.0.0.1:5354']
#
define designate::pool_target (
Hash $options,
$type,
Array[String[1]] $masters = ['127.0.0.1:5354'],
) {
warning('Support for pool-manager was deprecated.')
include designate::deps
$options_real = join(join_keys_to_values($options,':'),',')
designate_config {
"pool_target:${name}/options": value => $options_real;
"pool_target:${name}/type": value => $type;
"pool_target:${name}/masters": value => join($masters,',');
}
}