diff --git a/modules/openstack_project/manifests/single_use_slave.pp b/modules/openstack_project/manifests/single_use_slave.pp index c2e3be5d4f..9340f1ebc5 100644 --- a/modules/openstack_project/manifests/single_use_slave.pp +++ b/modules/openstack_project/manifests/single_use_slave.pp @@ -9,6 +9,7 @@ class openstack_project::single_use_slave ( $certname = $::fqdn, $install_users = true, + $install_resolv_conf = true, $sudo = false, $bare = true, $python3 = false, @@ -18,10 +19,11 @@ class openstack_project::single_use_slave ( $ssh_key = $openstack_project::jenkins_ssh_key ) inherits openstack_project { class { 'openstack_project::template': - certname => $certname, - automatic_upgrades => $automatic_upgrades, - install_users => $install_users, - iptables_rules4 => + certname => $certname, + automatic_upgrades => $automatic_upgrades, + install_users => $install_users, + install_resolv_conf => $install_resolv_conf, + iptables_rules4 => [ # Ports 69 and 6385 allow to allow ironic VM nodes to reach tftp and # the ironic API from the neutron public net diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index 3cb0d07e00..710ce34d1a 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -8,6 +8,7 @@ class openstack_project::template ( $iptables_rules4 = [], $iptables_rules6 = [], $install_users = true, + $install_resolv_conf = true, $automatic_upgrades = true, $certname = $::fqdn ) { @@ -43,7 +44,9 @@ class openstack_project::template ( ensure => present, } - class { 'unbound': } + class { 'unbound': + install_resolv_conf => $install_resolv_conf + } if $::osfamily == 'Debian' { # Make sure dig is installed diff --git a/modules/unbound/manifests/init.pp b/modules/unbound/manifests/init.pp index 0a1b420185..f5e3896202 100644 --- a/modules/unbound/manifests/init.pp +++ b/modules/unbound/manifests/init.pp @@ -18,6 +18,7 @@ # recursive resolver. class unbound ( + $install_resolv_conf = true ) { if ($::osfamily == 'Debian') { @@ -62,13 +63,15 @@ class unbound ( } } - # Rackspace uses static config files - file { '/etc/resolv.conf': - content => "nameserver 127.0.0.1\n", - owner => 'root', - group => 'root', - mode => '0444', - require => Service['unbound'], + if ($install_resolv_conf) { + # Rackspace uses static config files + file { '/etc/resolv.conf': + content => "nameserver 127.0.0.1\n", + owner => 'root', + group => 'root', + mode => '0444', + require => Service['unbound'], + } } service { 'unbound':