Merge "Debian/Ubuntu: Fix rndc.key file path in rndc.conf"

This commit is contained in:
Zuul 2023-12-12 10:48:19 +00:00 committed by Gerrit Code Review
commit 61a1a93e39
4 changed files with 12 additions and 3 deletions

View File

@ -159,6 +159,9 @@ fi
# bind
if [ -d /etc/named ]; then
sudo cp -r /etc/named $LOG_DIR/etc
if [ -f /etc/rndc.conf ]; then
sudo cp -r /etc/rndc.conf $LOG_DIR/rndc.conf
fi
elif [ -d /etc/bind ]; then
sudo cp -r /etc/bind $LOG_DIR/etc
fi

View File

@ -42,10 +42,13 @@ class openstack_integration::bind {
},
}
$dnsdir = $::dns::params::dnsdir
# ::dns creates the rndc key but not a rndc.conf.
# Contribute this in upstream ::dns ?
file { '/etc/rndc.conf':
file { 'rndc.conf':
ensure => present,
path => "${dnsdir}/rndc.conf",
owner => $::dns::params::user,
group => $::dns::params::group,
content => template("${module_name}/rndc.conf.erb"),

View File

@ -124,10 +124,13 @@ class openstack_integration::designate (
bind9_hosts => [$::openstack_integration::config::host],
dns_port => 5322,
mdns_hosts => [$::openstack_integration::config::host],
rndc_config_file => '/etc/rndc.conf',
rndc_config_file => "${::dns::params::dnsdir}/rndc.conf",
rndc_key_file => $::dns::params::rndckeypath,
manage_pool => true,
# Configure bind using openstack_integration::bind
configure_bind => false,
}
File['rndc.conf'] -> Anchor['designate::service::begin']
Class['dns::service'] -> Anchor['designate::service::begin']
}

View File

@ -1,4 +1,4 @@
include "/etc/rndc.key";
include "<%= @dnsdir %>/rndc.key";
options {
default-key "rndc-key";
default-server <%= @bind_host %>;