diff --git a/manifests/bind.pp b/manifests/bind.pp index eaf797141..378ac3a7c 100644 --- a/manifests/bind.pp +++ b/manifests/bind.pp @@ -6,6 +6,17 @@ class openstack_integration::bind { include openstack_integration::config include openstack_integration::params + $bind_host = $::openstack_integration::config::host + + $listen_on = $::openstack_integration::config::ipv6 ? { + true => 'none', + default => $bind_host, + } + $listen_on_v6 = $::openstack_integration::config::ipv6 ? { + true => $bind_host, + default => 'none', + } + # NOTE (dmsimard): listen_on_v6 is false and overridden due to extended port # configuration in additional_options class { 'dns': @@ -13,10 +24,17 @@ class openstack_integration::bind { allow_recursion => [], listen_on_v6 => false, additional_options => { - 'listen-on' => 'port 5322 { any; }', - 'listen-on-v6' => 'port 5322 { any; }', + 'listen-on' => "port 5322 { ${listen_on}; }", + 'listen-on-v6' => "port 5322 { ${listen_on_v6}; }", 'auth-nxdomain' => 'no', - } + }, + controls => { + $bind_host => { + 'port' => 953, + 'allowed_addresses' => [$bind_host], + 'keys' => ['rndc-key'], + } + }, } # ::dns creates the rndc key but not a rndc.conf. diff --git a/manifests/designate.pp b/manifests/designate.pp index cd4643e47..e9b36d084 100644 --- a/manifests/designate.pp +++ b/manifests/designate.pp @@ -86,9 +86,8 @@ class openstack_integration::designate { workers => '2', } - # IPv6 doesn't work for mdns ? https://bugs.launchpad.net/designate/+bug/1501396 class { 'designate::mdns': - listen => '127.0.0.1:5354' + listen => "${::openstack_integration::config::ip_for_url}:5354" } class { 'designate::central': } @@ -98,7 +97,10 @@ class openstack_integration::designate { class { 'designate::worker': } class { 'designate::backend::bind9': + nameservers => [$::openstack_integration::config::host], + bind9_hosts => [$::openstack_integration::config::host], dns_port => 5322, + mdns_hosts => [$::openstack_integration::config::host], rndc_config_file => '/etc/rndc.conf', rndc_key_file => $::dns::params::rndckeypath, manage_pool => true diff --git a/templates/rndc.conf.erb b/templates/rndc.conf.erb index 1513185ca..62a784623 100644 --- a/templates/rndc.conf.erb +++ b/templates/rndc.conf.erb @@ -1,6 +1,6 @@ include "/etc/rndc.key"; options { default-key "rndc-key"; - default-server 127.0.0.1; + default-server <%= @bind_host %>; default-port 953; };