# Stuff common to all debian.org servers
#
class debian_org::apt {
- if $::lsbmajdistrelease <= '7' {
- $mungedcodename = $::lsbdistcodename
- } elsif ($::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) {
- $mungedcodename = "${::lsbdistcodename}-kfreebsd"
- } else {
- $mungedcodename = $::lsbdistcodename
- }
-
- if $::lsbmajdistrelease <= '8' {
+ if versioncmp($::lsbmajdistrelease, '8') <= 0 {
$fallbackmirror = 'http://cdn-fastly.deb.debian.org/debian/'
} else {
$fallbackmirror = 'http://deb.debian.org/debian/'
}
if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
- $mirror = [ getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'), $fallbackmirror, 'http://debian.anycast-test.mirrors.debian.org/debian/' ]
+ $mirror = [ getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'), $fallbackmirror ]
} else {
- $mirror = [ $fallbackmirror, 'http://debian.anycast-test.mirrors.debian.org/debian/' ]
+ $mirror = [ $fallbackmirror ]
}
site::aptrepo { 'debian':
url => $mirror,
- suite => [ $mungedcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
+ suite => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
components => ['main','contrib','non-free']
}
- site::aptrepo { 'security':
- url => [ 'http://security-cdn.debian.org/', 'http://security.anycast-test.mirrors.debian.org/debian-security/', 'http://security.debian.org/' ],
- suite => "${mungedcodename}/updates",
- components => ['main','contrib','non-free']
+
+ if versioncmp($::lsbmajdistrelease, '8') <= 0 {
+ site::aptrepo { 'security':
+ url => [ 'http://security-cdn.debian.org/', 'http://security.debian.org/' ],
+ suite => "${::lsbdistcodename}/updates",
+ components => ['main','contrib','non-free']
+ }
+ } else {
+ site::aptrepo { 'security':
+ url => [ 'http://security.debian.org/' ],
+ suite => "${::lsbdistcodename}/updates",
+ components => ['main','contrib','non-free']
+ }
}
- if has_role('experimental_apache') {
- $dbdosuites = [ 'debian-all', $::lsbdistcodename, 'jessie-apache2' ]
+ # ca-certificates is installed by the ssl module
+ if versioncmp($::lsbmajdistrelease, '9') <= 0 {
+ package { 'apt-transport-https':
+ ensure => installed,
+ }
} else {
- $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
+ # transitional package in buster
+ package { 'apt-transport-https':
+ ensure => purged,
+ }
}
+ $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
site::aptrepo { 'db.debian.org':
- url => 'http://db.debian.org/debian-admin',
+ url => 'https://db.debian.org/debian-admin',
suite => $dbdosuites,
components => 'main',
key => 'puppet:///modules/debian_org/db.debian.org.gpg',
}
- if ($::hostname in [] or $::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) {
+ if ($::hostname in []) {
site::aptrepo { 'proposed-updates':
url => $mirror,
- suite => "${mungedcodename}-proposed-updates",
+ suite => "${::lsbdistcodename}-proposed-updates",
components => ['main','contrib','non-free']
}
} else {