X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian_org%2Fmanifests%2Fapt.pp;h=076463c36e62f65a241e132f5866e84ab008e9e3;hb=2e7ea5b5c1fd90631740fc204962b90a0409cceb;hp=948f606eaa3d96f54f01a426131596fd36164135;hpb=b529b139a60ea8355089511737c8264185d8d074;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian_org/manifests/apt.pp b/modules/debian_org/manifests/apt.pp index 948f606ea..076463c36 100644 --- a/modules/debian_org/manifests/apt.pp +++ b/modules/debian_org/manifests/apt.pp @@ -3,14 +3,6 @@ # Stuff common to all debian.org servers # class debian_org::apt { - if versioncmp($::lsbmajdistrelease, '7') <= 0 { - $mungedcodename = $::lsbdistcodename - } elsif ($::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) { - $mungedcodename = "${::lsbdistcodename}-kfreebsd" - } else { - $mungedcodename = $::lsbdistcodename - } - if versioncmp($::lsbmajdistrelease, '8') <= 0 { $fallbackmirror = 'http://cdn-fastly.deb.debian.org/debian/' } else { @@ -18,38 +10,54 @@ class debian_org::apt { } 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 {