3 # Stuff common to all debian.org servers
5 class debian_org::apt {
6 if versioncmp($::lsbmajdistrelease, '8') <= 0 {
7 $fallbackmirror = 'http://cdn-fastly.deb.debian.org/debian/'
9 $fallbackmirror = 'http://deb.debian.org/debian/'
12 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
13 $mirror = [ getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'), $fallbackmirror, 'http://debian.anycast-test.mirrors.debian.org/debian/' ]
15 $mirror = [ $fallbackmirror, 'http://debian.anycast-test.mirrors.debian.org/debian/' ]
18 site::aptrepo { 'debian':
20 suite => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
21 components => ['main','contrib','non-free']
24 if ($::hostname in [smetana]) {
25 site::aptrepo { 'security':
29 site::aptrepo { 'security':
30 url => [ 'http://security-cdn.debian.org/', 'http://security.anycast-test.mirrors.debian.org/debian-security/', 'http://security.debian.org/' ],
31 suite => "${::lsbdistcodename}/updates",
32 components => ['main','contrib','non-free']
36 $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
37 site::aptrepo { 'db.debian.org':
38 url => 'http://db.debian.org/debian-admin',
41 key => 'puppet:///modules/debian_org/db.debian.org.gpg',
44 if ($::hostname in []) {
45 site::aptrepo { 'proposed-updates':
47 suite => "${::lsbdistcodename}-proposed-updates",
48 components => ['main','contrib','non-free']
51 site::aptrepo { 'proposed-updates':
56 site::aptrepo { 'debian-cdn':
59 site::aptrepo { 'debian.org':
62 site::aptrepo { 'debian2':
65 site::aptrepo { 'backports2.debian.org':
68 site::aptrepo { 'backports.debian.org':
71 site::aptrepo { 'volatile':
74 site::aptrepo { 'db.debian.org-suite':
77 site::aptrepo { 'debian-lts':
84 file { '/etc/apt/trusted-keys.d':
89 file { '/etc/apt/trusted.gpg':
94 file { '/etc/apt/preferences':
95 source => 'puppet:///modules/debian_org/apt.preferences',
97 file { '/etc/apt/apt.conf.d/local-compression':
98 source => 'puppet:///modules/debian_org/apt.conf.d/local-compression',
100 file { '/etc/apt/apt.conf.d/local-recommends':
101 source => 'puppet:///modules/debian_org/apt.conf.d/local-recommends',
103 file { '/etc/apt/apt.conf.d/local-pdiffs':
104 source => 'puppet:///modules/debian_org/apt.conf.d/local-pdiffs',
106 file { '/etc/apt/apt.conf.d/local-langs':
107 source => 'puppet:///modules/debian_org/apt.conf.d/local-langs',
110 exec { 'apt-get update':
111 path => '/usr/bin:/usr/sbin:/bin:/sbin',
112 onlyif => '/usr/local/bin/check_for_updates',
113 require => File['/usr/local/bin/check_for_updates']
115 Exec['apt-get update']->Package<| tag == extra_repo |>