X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian_org%2Fmanifests%2Fapt.pp;h=d52005f805aa0bdc416de37b2cb89e784a86f4db;hb=de5eefbd7521f4c9b65645c5788fe79b3565b78e;hp=4fcb87b487602a1d0dd868fcbe3e63b8d9a08ab3;hpb=2972577c62e8dfa15c111d5072b5755c3d1550e3;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian_org/manifests/apt.pp b/modules/debian_org/manifests/apt.pp index 4fcb87b48..d52005f80 100644 --- a/modules/debian_org/manifests/apt.pp +++ b/modules/debian_org/manifests/apt.pp @@ -15,27 +15,50 @@ class debian_org::apt { $mirror = [ $fallbackmirror ] } - site::aptrepo { 'debian': - url => $mirror, - suite => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ], - components => ['main','contrib','non-free'] + # jessie + if versioncmp($::lsbmajdistrelease, '8') <= 0 { + site::aptrepo { 'debian': + url => $mirror, + suite => [ $::lsbdistcodename ], + components => ['main','contrib','non-free'] + } + # stretch or buster + } else { + site::aptrepo { 'debian': + url => $mirror, + suite => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ], + components => ['main','contrib','non-free'] + } } - if ($::hostname in [smetana]) { + if versioncmp($::lsbmajdistrelease, '8') <= 0 { site::aptrepo { 'security': - ensure => absent, + 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-cdn.debian.org/', 'http://security.debian.org/' ], + url => [ 'http://security.debian.org/' ], suite => "${::lsbdistcodename}/updates", components => ['main','contrib','non-free'] } } + # ca-certificates is installed by the ssl module + if versioncmp($::lsbmajdistrelease, '9') <= 0 { + package { 'apt-transport-https': + ensure => installed, + } + } else { + # 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', @@ -106,6 +129,17 @@ class debian_org::apt { file { '/etc/apt/apt.conf.d/local-langs': source => 'puppet:///modules/debian_org/apt.conf.d/local-langs', } + file { '/etc/apt/apt.conf.d/local-cainfo': + 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', + } exec { 'apt-get update': path => '/usr/bin:/usr/sbin:/bin:/sbin',