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
02f2f302cc
commit
f78093ac1e
|
@ -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