3 # Stuff common to all debian.org servers
5 class debian_org::apt {
6 $mirror = lookup('apt::sources::debian::location')
8 base::aptrepo { 'debian':
10 suite => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
11 components => ['main','contrib','non-free']
14 base::aptrepo { 'security':
15 url => [ 'http://security.debian.org/' ],
16 suite => "${::lsbdistcodename}/updates",
17 components => ['main','contrib','non-free']
20 # ca-certificates is installed by the ssl module
21 if versioncmp($::lsbmajdistrelease, '9') <= 0 {
22 package { 'apt-transport-https':
26 # transitional package in buster
27 package { 'apt-transport-https':
31 $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
32 base::aptrepo { 'db.debian.org':
33 url => 'https://db.debian.org/debian-admin',
36 key => 'puppet:///modules/debian_org/db.debian.org.gpg',
39 if ($::hostname in []) {
40 base::aptrepo { 'proposed-updates':
42 suite => "${::lsbdistcodename}-proposed-updates",
43 components => ['main','contrib','non-free']
46 base::aptrepo { 'proposed-updates':
51 base::aptrepo { 'debian-cdn':
54 base::aptrepo { 'debian.org':
57 base::aptrepo { 'debian2':
60 base::aptrepo { 'backports2.debian.org':
63 base::aptrepo { 'backports.debian.org':
66 base::aptrepo { 'volatile':
69 base::aptrepo { 'db.debian.org-suite':
72 base::aptrepo { 'debian-lts':
79 file { '/etc/apt/trusted-keys.d':
84 file { '/etc/apt/trusted.gpg':
89 file { '/etc/apt/preferences':
90 source => 'puppet:///modules/debian_org/apt.preferences',
92 file { '/etc/apt/apt.conf.d/local-compression':
93 source => 'puppet:///modules/debian_org/apt.conf.d/local-compression',
95 file { '/etc/apt/apt.conf.d/local-recommends':
96 source => 'puppet:///modules/debian_org/apt.conf.d/local-recommends',
98 file { '/etc/apt/apt.conf.d/local-pdiffs':
99 source => 'puppet:///modules/debian_org/apt.conf.d/local-pdiffs',
101 file { '/etc/apt/apt.conf.d/local-langs':
102 source => 'puppet:///modules/debian_org/apt.conf.d/local-langs',
104 file { '/etc/apt/apt.conf.d/local-cainfo':
105 source => 'puppet:///modules/debian_org/apt.conf.d/local-cainfo',
107 file { '/etc/apt/apt.conf.d/local-pkglist':
112 command => 'dpkg-query -W -f \'${Package}\n\' > /var/lib/misc/thishost/pkglist',
113 creates => '/var/lib/misc/thishost/pkglist',
116 exec { 'apt-get update':
117 path => '/usr/bin:/usr/sbin:/bin:/sbin',
118 onlyif => '/usr/local/bin/check_for_updates',
119 require => File['/usr/local/bin/check_for_updates']
121 Exec['apt-get update']->Package<| tag == extra_repo |>