Add flag for unbound's resolv.conf
diskimage-builder does not run services that it installs, but this is a problem when we lay down the resolv.conf file in puppet with the service not running. So, put in a flag which defaults to true (which is current behavior) that a dib invocation of the puppet can turn off and then dib can plop the file down at the end of the process. Change-Id: I05d89ffacfdaf3563b8cb1460af12f114e1a0340
This commit is contained in:
parent
af897507a7
commit
e1eb830560
@ -9,6 +9,7 @@
|
|||||||
class openstack_project::single_use_slave (
|
class openstack_project::single_use_slave (
|
||||||
$certname = $::fqdn,
|
$certname = $::fqdn,
|
||||||
$install_users = true,
|
$install_users = true,
|
||||||
|
$install_resolv_conf = true,
|
||||||
$sudo = false,
|
$sudo = false,
|
||||||
$bare = true,
|
$bare = true,
|
||||||
$python3 = false,
|
$python3 = false,
|
||||||
@ -18,10 +19,11 @@ class openstack_project::single_use_slave (
|
|||||||
$ssh_key = $openstack_project::jenkins_ssh_key
|
$ssh_key = $openstack_project::jenkins_ssh_key
|
||||||
) inherits openstack_project {
|
) inherits openstack_project {
|
||||||
class { 'openstack_project::template':
|
class { 'openstack_project::template':
|
||||||
certname => $certname,
|
certname => $certname,
|
||||||
automatic_upgrades => $automatic_upgrades,
|
automatic_upgrades => $automatic_upgrades,
|
||||||
install_users => $install_users,
|
install_users => $install_users,
|
||||||
iptables_rules4 =>
|
install_resolv_conf => $install_resolv_conf,
|
||||||
|
iptables_rules4 =>
|
||||||
[
|
[
|
||||||
# Ports 69 and 6385 allow to allow ironic VM nodes to reach tftp and
|
# Ports 69 and 6385 allow to allow ironic VM nodes to reach tftp and
|
||||||
# the ironic API from the neutron public net
|
# the ironic API from the neutron public net
|
||||||
|
@ -8,6 +8,7 @@ class openstack_project::template (
|
|||||||
$iptables_rules4 = [],
|
$iptables_rules4 = [],
|
||||||
$iptables_rules6 = [],
|
$iptables_rules6 = [],
|
||||||
$install_users = true,
|
$install_users = true,
|
||||||
|
$install_resolv_conf = true,
|
||||||
$automatic_upgrades = true,
|
$automatic_upgrades = true,
|
||||||
$certname = $::fqdn
|
$certname = $::fqdn
|
||||||
) {
|
) {
|
||||||
@ -43,7 +44,9 @@ class openstack_project::template (
|
|||||||
ensure => present,
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'unbound': }
|
class { 'unbound':
|
||||||
|
install_resolv_conf => $install_resolv_conf
|
||||||
|
}
|
||||||
|
|
||||||
if $::osfamily == 'Debian' {
|
if $::osfamily == 'Debian' {
|
||||||
# Make sure dig is installed
|
# Make sure dig is installed
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
# recursive resolver.
|
# recursive resolver.
|
||||||
|
|
||||||
class unbound (
|
class unbound (
|
||||||
|
$install_resolv_conf = true
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ($::osfamily == 'Debian') {
|
if ($::osfamily == 'Debian') {
|
||||||
@ -62,13 +63,15 @@ class unbound (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rackspace uses static config files
|
if ($install_resolv_conf) {
|
||||||
file { '/etc/resolv.conf':
|
# Rackspace uses static config files
|
||||||
content => "nameserver 127.0.0.1\n",
|
file { '/etc/resolv.conf':
|
||||||
owner => 'root',
|
content => "nameserver 127.0.0.1\n",
|
||||||
group => 'root',
|
owner => 'root',
|
||||||
mode => '0444',
|
group => 'root',
|
||||||
require => Service['unbound'],
|
mode => '0444',
|
||||||
|
require => Service['unbound'],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'unbound':
|
service { 'unbound':
|
||||||
|
Loading…
Reference in New Issue
Block a user