X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian_org%2Fmanifests%2Fapt.pp;h=8ff0877463024caa2b09aa71dfc27d97b3cc1a22;hb=9c6e5abb124b6664dea47f2637e431286433b677;hp=076463c36e62f65a241e132f5866e84ab008e9e3;hpb=e9ebef450d0d6443fa0070ec30e4a40a23ca99fe;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian_org/manifests/apt.pp b/modules/debian_org/manifests/apt.pp index 076463c36..8ff087746 100644 --- a/modules/debian_org/manifests/apt.pp +++ b/modules/debian_org/manifests/apt.pp @@ -15,20 +15,30 @@ 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 { + 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 { - site::aptrepo { 'security': + base::aptrepo { 'security': url => [ 'http://security-cdn.debian.org/', 'http://security.debian.org/' ], suite => "${::lsbdistcodename}/updates", components => ['main','contrib','non-free'] } } else { - site::aptrepo { 'security': + base::aptrepo { 'security': url => [ 'http://security.debian.org/' ], suite => "${::lsbdistcodename}/updates", components => ['main','contrib','non-free'] @@ -47,7 +57,7 @@ class debian_org::apt { } } $dbdosuites = [ 'debian-all', $::lsbdistcodename ] - site::aptrepo { 'db.debian.org': + base::aptrepo { 'db.debian.org': url => 'https://db.debian.org/debian-admin', suite => $dbdosuites, components => 'main', @@ -55,39 +65,39 @@ class debian_org::apt { } if ($::hostname in []) { - site::aptrepo { 'proposed-updates': + base::aptrepo { 'proposed-updates': url => $mirror, suite => "${::lsbdistcodename}-proposed-updates", components => ['main','contrib','non-free'] } } else { - site::aptrepo { 'proposed-updates': + base::aptrepo { 'proposed-updates': ensure => absent, } } - site::aptrepo { 'debian-cdn': + base::aptrepo { 'debian-cdn': ensure => absent, } - site::aptrepo { 'debian.org': + base::aptrepo { 'debian.org': ensure => absent, } - site::aptrepo { 'debian2': + base::aptrepo { 'debian2': ensure => absent, } - site::aptrepo { 'backports2.debian.org': + base::aptrepo { 'backports2.debian.org': ensure => absent, } - site::aptrepo { 'backports.debian.org': + base::aptrepo { 'backports.debian.org': ensure => absent, } - site::aptrepo { 'volatile': + base::aptrepo { 'volatile': ensure => absent, } - site::aptrepo { 'db.debian.org-suite': + base::aptrepo { 'db.debian.org-suite': ensure => absent, } - site::aptrepo { 'debian-lts': + base::aptrepo { 'debian-lts': ensure => absent, } @@ -119,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',