]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Allow setting main debian mirror via puppet
authorPeter Palfrader <peter@palfrader.org>
Sun, 26 Aug 2012 07:23:32 +0000 (07:23 +0000)
committerPeter Palfrader <peter@palfrader.org>
Sun, 26 Aug 2012 07:23:32 +0000 (07:23 +0000)
modules/debian-org/manifests/init.pp
modules/debian-org/misc/hoster.yaml

index a12ce2d91d7c76f34b5726d9c983d4f14bb1d0c9..04db264f5a5528a0fe26d7bc39b9a2ec64077d03 100644 (file)
@@ -98,10 +98,18 @@ class debian-org {
                        components => ['main','contrib','non-free']
                }
 
-               site::aptrepo { 'volatile':
-                       url        => 'http://ftp.debian.org/debian',
-                       suite      => "${::lsbdistcodename}-updates",
-                       components => ['main','contrib','non-free']
+               if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
+                       site::aptrepo { 'volatile':
+                               url        => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
+                               suite      => "${::lsbdistcodename}-updates",
+                               components => ['main','contrib','non-free']
+                       }
+               } else {
+                       site::aptrepo { 'volatile':
+                               url        => 'http://ftp.debian.org/debian',
+                               suite      => "${::lsbdistcodename}-updates",
+                               components => ['main','contrib','non-free']
+                       }
                }
        }
        site::aptrepo { 'backports.org':
@@ -121,6 +129,14 @@ class debian-org {
                key        => 'puppet:///modules/debian-org/db.debian.org.asc',
        }
 
+       if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
+               site::aptrepo { 'debian':
+                       url        => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
+                       suite      => "${::lsbdistcodename}",
+                       components => ['main','contrib','non-free']
+               }
+       }
+
        file { '/etc/facter':
                ensure  => directory,
                purge   => true,
index 49752c070e26960eb8851d8153d43ff65ac0371b..cdb3da85734b1b5b89e9bf40f76e85e3ca9db4e1 100644 (file)
@@ -59,6 +59,7 @@ conova:
   netrange:
     - 217.196.149.224/28
   nameservers: [217.196.144.129, 217.196.144.229]
+  mirror-debian: http://debian.inode.at/debian/
 csail:
   netrange:
     - 128.31.0.0/24
@@ -111,6 +112,7 @@ uni-karlsruhe:
     - 2001:41b8:202:deb::/64
   searchpaths: [debprivate-darmstadt.debian.org]
   nameservers: [82.195.66.249, 217.198.242.225]
+  mirror-debian: http://debian.netcologne.de/debian/
 marist:
   netrange:
     - 148.100.96.0/25
@@ -150,6 +152,7 @@ sil:
   #nameservers: [213.129.232.1, 213.129.226.2]
   nameservers: [86.59.118.147, 86.59.118.148]
   allow_dns_query: [86.59.118.144/28, 2001:858:2:2::/64]
+  mirror-debian: http://ftp.at.debian.org/debian/
 ubcece:
   netrange:
     - 137.82.84.64/27