3 # Stuff common to all debian.org servers
5 class debian_org::apt {
6 if versioncmp($::lsbmajdistrelease, '7') <= 0 {
7 $mungedcodename = $::lsbdistcodename
8 } elsif ($::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) {
9 $mungedcodename = "${::lsbdistcodename}-kfreebsd"
11 $mungedcodename = $::lsbdistcodename
14 if versioncmp($::lsbmajdistrelease, '8') <= 0 {
15 $fallbackmirror = 'http://cdn-fastly.deb.debian.org/debian/'
17 $fallbackmirror = 'http://deb.debian.org/debian/'
20 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
21 $mirror = [ getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'), $fallbackmirror, 'http://debian.anycast-test.mirrors.debian.org/debian/' ]
23 $mirror = [ $fallbackmirror, 'http://debian.anycast-test.mirrors.debian.org/debian/' ]
26 site::aptrepo { 'debian':
28 suite => [ $mungedcodename, "${::lsbdistcodename}-backports", "${::lsbdistcodename}-updates" ],
29 components => ['main','contrib','non-free']
32 if ($::hostname in [smetana]) {
33 site::aptrepo { 'security':
37 site::aptrepo { 'security':
38 url => [ 'http://security-cdn.debian.org/', 'http://security.anycast-test.mirrors.debian.org/debian-security/', 'http://security.debian.org/' ],
39 suite => "${mungedcodename}/updates",
40 components => ['main','contrib','non-free']
44 $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
45 site::aptrepo { 'db.debian.org':
46 url => 'http://db.debian.org/debian-admin',
49 key => 'puppet:///modules/debian_org/db.debian.org.gpg',
52 if ($::hostname in [] or $::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) {
53 site::aptrepo { 'proposed-updates':
55 suite => "${mungedcodename}-proposed-updates",
56 components => ['main','contrib','non-free']
59 site::aptrepo { 'proposed-updates':
64 site::aptrepo { 'debian-cdn':
67 site::aptrepo { 'debian.org':
70 site::aptrepo { 'debian2':
73 site::aptrepo { 'backports2.debian.org':
76 site::aptrepo { 'backports.debian.org':
79 site::aptrepo { 'volatile':
82 site::aptrepo { 'db.debian.org-suite':
85 site::aptrepo { 'debian-lts':
92 file { '/etc/apt/trusted-keys.d':
97 file { '/etc/apt/trusted.gpg':
102 file { '/etc/apt/preferences':
103 source => 'puppet:///modules/debian_org/apt.preferences',
105 file { '/etc/apt/apt.conf.d/local-compression':
106 source => 'puppet:///modules/debian_org/apt.conf.d/local-compression',
108 file { '/etc/apt/apt.conf.d/local-recommends':
109 source => 'puppet:///modules/debian_org/apt.conf.d/local-recommends',
111 file { '/etc/apt/apt.conf.d/local-pdiffs':
112 source => 'puppet:///modules/debian_org/apt.conf.d/local-pdiffs',
114 file { '/etc/apt/apt.conf.d/local-langs':
115 source => 'puppet:///modules/debian_org/apt.conf.d/local-langs',
118 exec { 'apt-get update':
119 path => '/usr/bin:/usr/sbin:/bin:/sbin',
120 onlyif => '/usr/local/bin/check_for_updates',
121 require => File['/usr/local/bin/check_for_updates']
123 Exec['apt-get update']->Package<| tag == extra_repo |>