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 ]
15 $mirror = [ $fallbackmirror ]
18 site::aptrepo { 'debian':
20 suite => [ $::lsbdistcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
21 components => ['main','contrib','non-free']
24 if versioncmp($::lsbmajdistrelease, '8') <= 0 {
25 site::aptrepo { 'security':
26 url => [ 'http://security-cdn.debian.org/', 'http://security.debian.org/' ],
27 suite => "${::lsbdistcodename}/updates",
28 components => ['main','contrib','non-free']
31 site::aptrepo { 'security':
32 url => [ 'http://security.debian.org/' ],
33 suite => "${::lsbdistcodename}/updates",
34 components => ['main','contrib','non-free']
38 $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
39 site::aptrepo { 'db.debian.org':
40 url => 'http://db.debian.org/debian-admin',
43 key => 'puppet:///modules/debian_org/db.debian.org.gpg',
46 if ($::hostname in []) {
47 site::aptrepo { 'proposed-updates':
49 suite => "${::lsbdistcodename}-proposed-updates",
50 components => ['main','contrib','non-free']
53 site::aptrepo { 'proposed-updates':
58 site::aptrepo { 'debian-cdn':
61 site::aptrepo { 'debian.org':
64 site::aptrepo { 'debian2':
67 site::aptrepo { 'backports2.debian.org':
70 site::aptrepo { 'backports.debian.org':
73 site::aptrepo { 'volatile':
76 site::aptrepo { 'db.debian.org-suite':
79 site::aptrepo { 'debian-lts':
86 file { '/etc/apt/trusted-keys.d':
91 file { '/etc/apt/trusted.gpg':
96 file { '/etc/apt/preferences':
97 source => 'puppet:///modules/debian_org/apt.preferences',
99 file { '/etc/apt/apt.conf.d/local-compression':
100 source => 'puppet:///modules/debian_org/apt.conf.d/local-compression',
102 file { '/etc/apt/apt.conf.d/local-recommends':
103 source => 'puppet:///modules/debian_org/apt.conf.d/local-recommends',
105 file { '/etc/apt/apt.conf.d/local-pdiffs':
106 source => 'puppet:///modules/debian_org/apt.conf.d/local-pdiffs',
108 file { '/etc/apt/apt.conf.d/local-langs':
109 source => 'puppet:///modules/debian_org/apt.conf.d/local-langs',
112 exec { 'apt-get update':
113 path => '/usr/bin:/usr/sbin:/bin:/sbin',
114 onlyif => '/usr/local/bin/check_for_updates',
115 require => File['/usr/local/bin/check_for_updates']
117 Exec['apt-get update']->Package<| tag == extra_repo |>