debian_org::apt: remove jessie support
[mirror/dsa-puppet.git] / modules / debian_org / manifests / apt.pp
index 8ff0877..ea61ba0 100644 (file)
@@ -3,46 +3,18 @@
 # Stuff common to all debian.org servers
 #
 class debian_org::apt {
-       if versioncmp($::lsbmajdistrelease, '8') <= 0 {
-               $fallbackmirror = 'http://cdn-fastly.deb.debian.org/debian/'
-       } else {
-               $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 ]
+       base::aptrepo { 'debian':
+               url        => $mirror,
+               suite      => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
+               components => ['main','contrib','non-free']
        }
 
-       # 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']
-               }
-       }
-
-       if versioncmp($::lsbmajdistrelease, '8') <= 0 {
-               base::aptrepo { 'security':
-                       url        => [ 'http://security-cdn.debian.org/', 'http://security.debian.org/' ],
-                       suite      => "${::lsbdistcodename}/updates",
-                       components => ['main','contrib','non-free']
-               }
-       } else {
-               base::aptrepo { 'security':
-                       url        => [ 'http://security.debian.org/' ],
-                       suite      => "${::lsbdistcodename}/updates",
-                       components => ['main','contrib','non-free']
-               }
+       base::aptrepo { 'security':
+               url        => [ 'http://security.debian.org/' ],
+               suite      => "${::lsbdistcodename}/updates",
+               components => ['main','contrib','non-free']
        }
 
        # ca-certificates is installed by the ssl module