The trick for merge options to work is to use lookup() rather than hiera()
authorPeter Palfrader <peter@palfrader.org>
Tue, 10 Sep 2019 15:05:01 +0000 (17:05 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 10 Sep 2019 15:05:01 +0000 (17:05 +0200)
12 files changed:
hieradata/common.yaml
hieradata/hosters/1und1-sec.yaml
hieradata/hosters/accumu.yaml
hieradata/hosters/brainfood.yaml
hieradata/hosters/csail.yaml
hieradata/hosters/grnet.yaml
hieradata/hosters/man-da.yaml
hieradata/hosters/sanger.yaml
hieradata/hosters/sil.yaml
hieradata/hosters/ubc.yaml
modules/resolv/manifests/init.pp
modules/resolv/templates/resolv.conf.erb

index df8ab68..8333434 100644 (file)
@@ -2,14 +2,14 @@
 
 lookup_options:
   # with merge: unique entries in other hiera sources add to the array
-  searchpaths:
+  resolv_conf::searchpaths:
     merge: unique
   apt::sources::debian::location:
     merge: unique
 
 nameservers: []
-searchpaths: ['debian.org']
-resolvoptions: []
+resolv_conf::searchpaths: ['debian.org']
+resolv_conf::resolvoptions: []
 allow_dns_query: []
 role_config__mirrors:
   mirror_basedir_prefix: '/srv/mirrors/'
index 8c07506..d50afc0 100644 (file)
@@ -1,3 +1,3 @@
 ---
-searchpaths:
+resolv_conf::searchpaths:
   - debprivate-oneandone.debian.org
index 0e23d01..250a27d 100644 (file)
@@ -6,6 +6,6 @@ nameservers:
   - 2001:6b0:e:2018::252
   - 130.239.1.90
   - 130.239.4.100
-searchpaths:
+resolv_conf::searchpaths:
   - priv.accumu.debian.org
   - debprivate-accumu.debian.org
index 4cb141c..76f8ad5 100644 (file)
@@ -1,3 +1,3 @@
 ---
-searchpaths:
+resolv_conf::searchpaths:
   - debprivate-brainfood.debian.org
index f4b0f36..a7f225c 100644 (file)
@@ -3,7 +3,7 @@ nameservers:
   - 128.30.2.24
   - 128.30.2.25
   - 128.30.0.125
-searchpaths:
+resolv_conf::searchpaths:
   - priv.csail.debian.org
 # currently only used by VMs with systemd-timesync
 local-timeservers:
index a6b884a..d12caeb 100644 (file)
@@ -2,7 +2,7 @@
 nameservers:
   - 62.217.126.164
   - 194.177.210.210
-searchpaths:
+resolv_conf::searchpaths:
   - debprivate-grnet.debian.org
 # currently only used by VMs with systemd-timesync
 local-timeservers:
index 8db6a9e..6200b3f 100644 (file)
@@ -5,7 +5,7 @@ nameservers:
 allow_dns_query:
   - 82.195.75.64/26
   - 172.29.180.0/24
-searchpaths:
+resolv_conf::searchpaths:
   - manda.debian.org
   - priv.manda.debian.org
 # currently only used by VMs with systemd-timesync
index dc25af7..fe56acb 100644 (file)
@@ -2,7 +2,7 @@
 nameservers:
   - 193.62.202.28
   - 193.62.202.29
-searchpaths:
+resolv_conf::searchpaths:
   - debprivate-sanger.debian.org
 allow_dns_query:
   - 193.62.202.24/29
index 0de2715..cf6aec8 100644 (file)
@@ -1,3 +1,3 @@
 ---
-searchpaths:
+resolv_conf::searchpaths:
   - priv.sil.debian.org
index a146e24..885436f 100644 (file)
@@ -9,7 +9,7 @@ nameservers:
   # ubc-enc2bl10
   - 209.87.16.10
   - 2607:f8f0:614:1::1274:10
-searchpaths:
+resolv_conf::searchpaths:
   - debprivate-ubc.debian.org
   - priv.ubc.debian.org
 allow_dns_query:
index 669fe4c..c2a741d 100644 (file)
@@ -2,11 +2,11 @@ class resolv {
 
        $nameservers = $facts['unbound'] ? {
                true    => ['127.0.0.1'],
-               default => hiera('nameservers'),
+               default => lookup('nameservers'),
        }
 
-       $searchpaths = hiera('searchpaths')
-       $resolvoptions = hiera('resolvoptions')
+       $searchpaths = lookup('resolv_conf::searchpaths')
+       $resolvoptions = lookup('resolv_conf::resolvoptions')
 
        file { '/etc/resolv.conf':
                        content => template('resolv/resolv.conf.erb');
index 6f70f48..6e02dbb 100644 (file)
@@ -16,7 +16,7 @@ end
 %>
 
 <% if @searchpaths.size() > 0 %>
-search <%= @searchpaths.join(" ") %> debian.org
+search <%= @searchpaths.join(" ") %>
 <% end -%>
 
 <%= nameservers.map{ |ns| "nameserver #{ns}"}.join("\n") %>