projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
946a95b
)
The trick for merge options to work is to use lookup() rather than hiera()
author
Peter Palfrader
<peter@palfrader.org>
Tue, 10 Sep 2019 15:05:01 +0000
(17:05 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Tue, 10 Sep 2019 15:05:01 +0000
(17:05 +0200)
12 files changed:
hieradata/common.yaml
patch
|
blob
|
history
hieradata/hosters/1und1-sec.yaml
patch
|
blob
|
history
hieradata/hosters/accumu.yaml
patch
|
blob
|
history
hieradata/hosters/brainfood.yaml
patch
|
blob
|
history
hieradata/hosters/csail.yaml
patch
|
blob
|
history
hieradata/hosters/grnet.yaml
patch
|
blob
|
history
hieradata/hosters/man-da.yaml
patch
|
blob
|
history
hieradata/hosters/sanger.yaml
patch
|
blob
|
history
hieradata/hosters/sil.yaml
patch
|
blob
|
history
hieradata/hosters/ubc.yaml
patch
|
blob
|
history
modules/resolv/manifests/init.pp
patch
|
blob
|
history
modules/resolv/templates/resolv.conf.erb
patch
|
blob
|
history
diff --git
a/hieradata/common.yaml
b/hieradata/common.yaml
index
df8ab68
..
8333434
100644
(file)
--- a/
hieradata/common.yaml
+++ b/
hieradata/common.yaml
@@
-2,14
+2,14
@@
lookup_options:
# with merge: unique entries in other hiera sources add to the array
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: []
merge: unique
apt::sources::debian::location:
merge: unique
nameservers: []
-searchpaths: ['debian.org']
-resolvoptions: []
+
resolv_conf::
searchpaths: ['debian.org']
+resolv
_conf::resolv
options: []
allow_dns_query: []
role_config__mirrors:
mirror_basedir_prefix: '/srv/mirrors/'
allow_dns_query: []
role_config__mirrors:
mirror_basedir_prefix: '/srv/mirrors/'
diff --git
a/hieradata/hosters/1und1-sec.yaml
b/hieradata/hosters/1und1-sec.yaml
index
8c07506
..
d50afc0
100644
(file)
--- a/
hieradata/hosters/1und1-sec.yaml
+++ b/
hieradata/hosters/1und1-sec.yaml
@@
-1,3
+1,3
@@
---
---
-searchpaths:
+
resolv_conf::
searchpaths:
- debprivate-oneandone.debian.org
- debprivate-oneandone.debian.org
diff --git
a/hieradata/hosters/accumu.yaml
b/hieradata/hosters/accumu.yaml
index
0e23d01
..
250a27d
100644
(file)
--- a/
hieradata/hosters/accumu.yaml
+++ b/
hieradata/hosters/accumu.yaml
@@
-6,6
+6,6
@@
nameservers:
- 2001:6b0:e:2018::252
- 130.239.1.90
- 130.239.4.100
- 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
- priv.accumu.debian.org
- debprivate-accumu.debian.org
diff --git
a/hieradata/hosters/brainfood.yaml
b/hieradata/hosters/brainfood.yaml
index
4cb141c
..
76f8ad5
100644
(file)
--- a/
hieradata/hosters/brainfood.yaml
+++ b/
hieradata/hosters/brainfood.yaml
@@
-1,3
+1,3
@@
---
---
-searchpaths:
+
resolv_conf::
searchpaths:
- debprivate-brainfood.debian.org
- debprivate-brainfood.debian.org
diff --git
a/hieradata/hosters/csail.yaml
b/hieradata/hosters/csail.yaml
index
f4b0f36
..
a7f225c
100644
(file)
--- a/
hieradata/hosters/csail.yaml
+++ b/
hieradata/hosters/csail.yaml
@@
-3,7
+3,7
@@
nameservers:
- 128.30.2.24
- 128.30.2.25
- 128.30.0.125
- 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:
- priv.csail.debian.org
# currently only used by VMs with systemd-timesync
local-timeservers:
diff --git
a/hieradata/hosters/grnet.yaml
b/hieradata/hosters/grnet.yaml
index
a6b884a
..
d12caeb
100644
(file)
--- a/
hieradata/hosters/grnet.yaml
+++ b/
hieradata/hosters/grnet.yaml
@@
-2,7
+2,7
@@
nameservers:
- 62.217.126.164
- 194.177.210.210
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:
- debprivate-grnet.debian.org
# currently only used by VMs with systemd-timesync
local-timeservers:
diff --git
a/hieradata/hosters/man-da.yaml
b/hieradata/hosters/man-da.yaml
index
8db6a9e
..
6200b3f
100644
(file)
--- a/
hieradata/hosters/man-da.yaml
+++ b/
hieradata/hosters/man-da.yaml
@@
-5,7
+5,7
@@
nameservers:
allow_dns_query:
- 82.195.75.64/26
- 172.29.180.0/24
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
- manda.debian.org
- priv.manda.debian.org
# currently only used by VMs with systemd-timesync
diff --git
a/hieradata/hosters/sanger.yaml
b/hieradata/hosters/sanger.yaml
index
dc25af7
..
fe56acb
100644
(file)
--- a/
hieradata/hosters/sanger.yaml
+++ b/
hieradata/hosters/sanger.yaml
@@
-2,7
+2,7
@@
nameservers:
- 193.62.202.28
- 193.62.202.29
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
- debprivate-sanger.debian.org
allow_dns_query:
- 193.62.202.24/29
diff --git
a/hieradata/hosters/sil.yaml
b/hieradata/hosters/sil.yaml
index
0de2715
..
cf6aec8
100644
(file)
--- a/
hieradata/hosters/sil.yaml
+++ b/
hieradata/hosters/sil.yaml
@@
-1,3
+1,3
@@
---
---
-searchpaths:
+
resolv_conf::
searchpaths:
- priv.sil.debian.org
- priv.sil.debian.org
diff --git
a/hieradata/hosters/ubc.yaml
b/hieradata/hosters/ubc.yaml
index
a146e24
..
885436f
100644
(file)
--- a/
hieradata/hosters/ubc.yaml
+++ b/
hieradata/hosters/ubc.yaml
@@
-9,7
+9,7
@@
nameservers:
# ubc-enc2bl10
- 209.87.16.10
- 2607:f8f0:614:1::1274:10
# 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:
- debprivate-ubc.debian.org
- priv.ubc.debian.org
allow_dns_query:
diff --git
a/modules/resolv/manifests/init.pp
b/modules/resolv/manifests/init.pp
index
669fe4c
..
c2a741d
100644
(file)
--- a/
modules/resolv/manifests/init.pp
+++ b/
modules/resolv/manifests/init.pp
@@
-2,11
+2,11
@@
class resolv {
$nameservers = $facts['unbound'] ? {
true => ['127.0.0.1'],
$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');
file { '/etc/resolv.conf':
content => template('resolv/resolv.conf.erb');
diff --git
a/modules/resolv/templates/resolv.conf.erb
b/modules/resolv/templates/resolv.conf.erb
index
6f70f48
..
6e02dbb
100644
(file)
--- a/
modules/resolv/templates/resolv.conf.erb
+++ b/
modules/resolv/templates/resolv.conf.erb
@@
-16,7
+16,7
@@
end
%>
<% if @searchpaths.size() > 0 %>
%>
<% if @searchpaths.size() > 0 %>
-search <%= @searchpaths.join(" ") %>
debian.org
+search <%= @searchpaths.join(" ") %>
<% end -%>
<%= nameservers.map{ |ns| "nameserver #{ns}"}.join("\n") %>
<% end -%>
<%= nameservers.map{ |ns| "nameserver #{ns}"}.join("\n") %>