Note that exim contains tracker-specific configuration
[mirror/dsa-puppet.git] / modules / debian_org / manifests / apt.pp
index 5d5b6af..c46c72f 100644 (file)
@@ -3,28 +3,12 @@
 # Stuff common to all debian.org servers
 #
 class debian_org::apt {
-       $fallbackmirror = 'http://deb.debian.org/debian/'
+       $mirror = lookup('apt::sources::debian::location')
 
-       if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
-               $mirror = [ getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'), $fallbackmirror ]
-       } else {
-               $mirror = [ $fallbackmirror ]
-       }
-
-       # jessie
-       if versioncmp($::lsbmajdistrelease, '8') <= 0 {
-               base::aptrepo { 'debian':
-                       url        => $mirror,
-                       suite      => [ $::lsbdistcodename ],
-                       components => ['main','contrib','non-free']
-               }
-       # stretch or buster
-       } else {
-               base::aptrepo { 'debian':
-                       url        => $mirror,
-                       suite      => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
-                       components => ['main','contrib','non-free']
-               }
+       base::aptrepo { 'debian':
+               url        => $mirror,
+               suite      => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
+               components => ['main','contrib','non-free']
        }
 
        base::aptrepo { 'security':
@@ -121,12 +105,7 @@ class debian_org::apt {
                source => 'puppet:///modules/debian_org/apt.conf.d/local-cainfo',
        }
        file { '/etc/apt/apt.conf.d/local-pkglist':
-               source => 'puppet:///modules/debian_org/apt.conf.d/local-pkglist',
-       }
-
-       exec { 'dpkg list':
-               command => 'dpkg-query -W -f \'${Package}\n\' > /var/lib/misc/thishost/pkglist',
-               creates => '/var/lib/misc/thishost/pkglist',
+               ensure => 'absent',
        }
 
        exec { 'apt-get update':