From 5875fb1ef594cabba877f67897bed8d834c7714d Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Sun, 23 Mar 2014 17:01:47 -0700 Subject: [PATCH] Unbound: also override dhclient config on debian The tripleo cloud uses dhcp, so make sure we override the nameserver to point to localhost in that case. Change-Id: If498925fc524ece91e2662a1d78008c8dce9d320 --- modules/unbound/files/dhclient.conf.debian | 9 +++++++++ modules/unbound/manifests/init.pp | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 modules/unbound/files/dhclient.conf.debian diff --git a/modules/unbound/files/dhclient.conf.debian b/modules/unbound/files/dhclient.conf.debian new file mode 100644 index 0000000000..c942598ee7 --- /dev/null +++ b/modules/unbound/files/dhclient.conf.debian @@ -0,0 +1,9 @@ +option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; +send host-name ""; +request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, domain-search, host-name, + netbios-name-servers, netbios-scope, interface-mtu, + rfc3442-classless-static-routes, ntp-servers, + dhcp6.domain-search, dhcp6.fqdn, + dhcp6.name-servers, dhcp6.sntp-servers; +supersede domain-name-servers 127.0.0.1; diff --git a/modules/unbound/manifests/init.pp b/modules/unbound/manifests/init.pp index 17d045450e..cd037e1a20 100644 --- a/modules/unbound/manifests/init.pp +++ b/modules/unbound/manifests/init.pp @@ -48,6 +48,14 @@ class unbound ( mode => '0444', require => Service['unbound'], } + + # Tripleo uses dhcp + file { '/etc/dhcp/dhclient.conf': + source => 'puppet:///modules/unbound/dhclient.conf.debian', + owner => 'root', + group => 'root', + mode => '0444', + } } # Ubuntu uses resolvconf which will update resolv.conf to point to