# 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':
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':