get debian mirror for apt from hiera (not yet doing that for schroot)
authorPeter Palfrader <peter@palfrader.org>
Tue, 10 Sep 2019 12:12:49 +0000 (14:12 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 10 Sep 2019 12:12:49 +0000 (14:12 +0200)
16 files changed:
hieradata/common.yaml
hieradata/hosters/aql.yaml [new file with mode: 0644]
hieradata/hosters/arm.yaml [new file with mode: 0644]
hieradata/hosters/brown.yaml [new file with mode: 0644]
hieradata/hosters/bytemark.yaml
hieradata/hosters/conova.yaml [new file with mode: 0644]
hieradata/hosters/csail.yaml
hieradata/hosters/gatech.yaml
hieradata/hosters/man-da.yaml
hieradata/hosters/marist.yaml [new file with mode: 0644]
hieradata/hosters/osuosl.yaml [new file with mode: 0644]
hieradata/hosters/sanger.yaml
hieradata/hosters/ubc.yaml
hieradata/hosters/ynic.yaml
hieradata/hosters/zivit.yaml
modules/debian_org/manifests/apt.pp

index 174a7dd..d79bbf8 100644 (file)
@@ -19,6 +19,12 @@ paths:
   auto_certs_dir: '/srv/puppet.debian.org/ca/RESULT/certs'
   auto_clientcerts_dir: '/srv/puppet.debian.org/ca/RESULT/clientcerts'
 
+lookup_options:
+  # entries in other hiera sources add to the array
+  apt::sources::debian::location:
+    merge: unique
+apt::sources::debian::location: 'http://deb.debian.org/debian/'
+
 # all of these should be retired in favour of including the class role
 # with the host. weasel, 2019-09
 roles:
diff --git a/hieradata/hosters/aql.yaml b/hieradata/hosters/aql.yaml
new file mode 100644 (file)
index 0000000..d5b96e1
--- /dev/null
@@ -0,0 +1,2 @@
+---
+apt::sources::debian::location: 'https://mirror.bytemark.co.uk/debian/'
diff --git a/hieradata/hosters/arm.yaml b/hieradata/hosters/arm.yaml
new file mode 100644 (file)
index 0000000..d5b96e1
--- /dev/null
@@ -0,0 +1,2 @@
+---
+apt::sources::debian::location: 'https://mirror.bytemark.co.uk/debian/'
diff --git a/hieradata/hosters/brown.yaml b/hieradata/hosters/brown.yaml
new file mode 100644 (file)
index 0000000..931a59e
--- /dev/null
@@ -0,0 +1,2 @@
+---
+apt::sources::debian::location: 'https://mirrors.wikimedia.org/debian'
index 739b2b9..b56399c 100644 (file)
@@ -8,3 +8,5 @@ allow_dns_query:
 local-timeservers:
   - bm-bl1.debian.org
   - bm-bl2.debian.org
+
+apt::sources::debian::location: 'https://mirror.bytemark.co.uk/debian/'
diff --git a/hieradata/hosters/conova.yaml b/hieradata/hosters/conova.yaml
new file mode 100644 (file)
index 0000000..c5c3f44
--- /dev/null
@@ -0,0 +1,3 @@
+---
+
+apt::sources::debian::location: 'https://mirror.netcologne.de/debian/'
index e3ff9c7..f4b0f36 100644 (file)
@@ -9,3 +9,5 @@ searchpaths:
 local-timeservers:
   - csail-node01.debian.org
   - csail-node02.debian.org
+
+apt::sources::debian::location: 'https://mirrors.wikimedia.org/debian'
index 0badec9..6f0ae31 100644 (file)
@@ -2,3 +2,5 @@
 nameservers:
   - 143.215.130.231
   - 143.215.130.232
+
+apt::sources::debian::location: 'https://mirrors.wikimedia.org/debian'
index 8500f91..8db6a9e 100644 (file)
@@ -12,3 +12,5 @@ searchpaths:
 local-timeservers:
   - manda-node03.debian.org
   - manda-node04.debian.org
+
+apt::sources::debian::location: 'https://mirror.netcologne.de/debian/'
diff --git a/hieradata/hosters/marist.yaml b/hieradata/hosters/marist.yaml
new file mode 100644 (file)
index 0000000..ca3889d
--- /dev/null
@@ -0,0 +1,3 @@
+---
+
+apt::sources::debian::location: 'https://mirrors.wikimedia.org/debian'
diff --git a/hieradata/hosters/osuosl.yaml b/hieradata/hosters/osuosl.yaml
new file mode 100644 (file)
index 0000000..ca3889d
--- /dev/null
@@ -0,0 +1,3 @@
+---
+
+apt::sources::debian::location: 'https://mirrors.wikimedia.org/debian'
index 4efe07b..dc25af7 100644 (file)
@@ -6,3 +6,5 @@ searchpaths:
   - debprivate-sanger.debian.org
 allow_dns_query:
   - 193.62.202.24/29
+
+apt::sources::debian::location: 'https://mirror.bytemark.co.uk/debian/'
index ede29bd..a146e24 100644 (file)
@@ -21,3 +21,5 @@ allow_dns_query:
 local-timeservers:
   - ubc-enc2bl01.debian.org
   - ubc-enc2bl02.debian.org
+
+apt::sources::debian::location: 'https://mirrors.wikimedia.org/debian'
index 89440d4..79864bc 100644 (file)
@@ -4,3 +4,5 @@ nameservers:
   - 144.32.169.75
   - 144.32.169.76
 firewall_blocks_dns: true
+
+apt::sources::debian::location: 'https://mirror.bytemark.co.uk/debian/'
index 809a469..dbbc601 100644 (file)
@@ -3,3 +3,5 @@ nameservers:
   - 80.245.147.141
   - 80.245.147.142
   - 80.245.147.143
+
+apt::sources::debian::location: 'https://mirror.netcologne.de/debian/'
index 5d5b6af..eaed3f1 100644 (file)
@@ -3,13 +3,7 @@
 # Stuff common to all debian.org servers
 #
 class debian_org::apt {
-       $fallbackmirror = 'http://deb.debian.org/debian/'
-
-       if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
-               $mirror = [ getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'), $fallbackmirror ]
-       } else {
-               $mirror = [ $fallbackmirror ]
-       }
+       $mirror = lookup('apt::sources::debian::location')
 
        # jessie
        if versioncmp($::lsbmajdistrelease, '8') <= 0 {