3 # Stuff common to all debian.org servers
5 class debian_org::apt {
6 $fallbackmirror = 'http://deb.debian.org/debian/'
8 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
9 $mirror = [ getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'), $fallbackmirror ]
11 $mirror = [ $fallbackmirror ]
15 if versioncmp($::lsbmajdistrelease, '8') <= 0 {
16 base::aptrepo { 'debian':
18 suite => [ $::lsbdistcodename ],
19 components => ['main','contrib','non-free']
23 base::aptrepo { 'debian':
25 suite => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
26 components => ['main','contrib','non-free']
30 base::aptrepo { 'security':
31 url => [ 'http://security.debian.org/' ],
32 suite => "${::lsbdistcodename}/updates",
33 components => ['main','contrib','non-free']
36 # ca-certificates is installed by the ssl module
37 if versioncmp($::lsbmajdistrelease, '9') <= 0 {
38 package { 'apt-transport-https':
42 # transitional package in buster
43 package { 'apt-transport-https':
47 $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
48 base::aptrepo { 'db.debian.org':
49 url => 'https://db.debian.org/debian-admin',
52 key => 'puppet:///modules/debian_org/db.debian.org.gpg',
55 if ($::hostname in []) {
56 base::aptrepo { 'proposed-updates':
58 suite => "${::lsbdistcodename}-proposed-updates",
59 components => ['main','contrib','non-free']
62 base::aptrepo { 'proposed-updates':
67 base::aptrepo { 'debian-cdn':
70 base::aptrepo { 'debian.org':
73 base::aptrepo { 'debian2':
76 base::aptrepo { 'backports2.debian.org':
79 base::aptrepo { 'backports.debian.org':
82 base::aptrepo { 'volatile':
85 base::aptrepo { 'db.debian.org-suite':
88 base::aptrepo { 'debian-lts':
95 file { '/etc/apt/trusted-keys.d':
100 file { '/etc/apt/trusted.gpg':
105 file { '/etc/apt/preferences':
106 source => 'puppet:///modules/debian_org/apt.preferences',
108 file { '/etc/apt/apt.conf.d/local-compression':
109 source => 'puppet:///modules/debian_org/apt.conf.d/local-compression',
111 file { '/etc/apt/apt.conf.d/local-recommends':
112 source => 'puppet:///modules/debian_org/apt.conf.d/local-recommends',
114 file { '/etc/apt/apt.conf.d/local-pdiffs':
115 source => 'puppet:///modules/debian_org/apt.conf.d/local-pdiffs',
117 file { '/etc/apt/apt.conf.d/local-langs':
118 source => 'puppet:///modules/debian_org/apt.conf.d/local-langs',
120 file { '/etc/apt/apt.conf.d/local-cainfo':
121 source => 'puppet:///modules/debian_org/apt.conf.d/local-cainfo',
123 file { '/etc/apt/apt.conf.d/local-pkglist':
124 source => 'puppet:///modules/debian_org/apt.conf.d/local-pkglist',
128 command => 'dpkg-query -W -f \'${Package}\n\' > /var/lib/misc/thishost/pkglist',
129 creates => '/var/lib/misc/thishost/pkglist',
132 exec { 'apt-get update':
133 path => '/usr/bin:/usr/sbin:/bin:/sbin',
134 onlyif => '/usr/local/bin/check_for_updates',
135 require => File['/usr/local/bin/check_for_updates']
137 Exec['apt-get update']->Package<| tag == extra_repo |>