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 if has_role('experimental_apache') {
45 $dbdosuites = [ 'debian-all', $::lsbdistcodename, 'jessie-apache2' ]
47 $dbdosuites = [ 'debian-all', $::lsbdistcodename ]
49 site::aptrepo { 'db.debian.org':
50 url => 'http://db.debian.org/debian-admin',
53 key => 'puppet:///modules/debian_org/db.debian.org.gpg',
56 if ($::hostname in [] or $::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) {
57 site::aptrepo { 'proposed-updates':
59 suite => "${mungedcodename}-proposed-updates",
60 components => ['main','contrib','non-free']
63 site::aptrepo { 'proposed-updates':
68 site::aptrepo { 'debian-cdn':
71 site::aptrepo { 'debian.org':
74 site::aptrepo { 'debian2':
77 site::aptrepo { 'backports2.debian.org':
80 site::aptrepo { 'backports.debian.org':
83 site::aptrepo { 'volatile':
86 site::aptrepo { 'db.debian.org-suite':
89 site::aptrepo { 'debian-lts':
96 file { '/etc/apt/trusted-keys.d':
101 file { '/etc/apt/trusted.gpg':
106 file { '/etc/apt/preferences':
107 source => 'puppet:///modules/debian_org/apt.preferences',
109 file { '/etc/apt/apt.conf.d/local-compression':
110 source => 'puppet:///modules/debian_org/apt.conf.d/local-compression',
112 file { '/etc/apt/apt.conf.d/local-recommends':
113 source => 'puppet:///modules/debian_org/apt.conf.d/local-recommends',
115 file { '/etc/apt/apt.conf.d/local-pdiffs':
116 source => 'puppet:///modules/debian_org/apt.conf.d/local-pdiffs',
118 file { '/etc/apt/apt.conf.d/local-langs':
119 source => 'puppet:///modules/debian_org/apt.conf.d/local-langs',
122 exec { 'apt-get update':
123 path => '/usr/bin:/usr/sbin:/bin:/sbin',
124 onlyif => '/usr/local/bin/check_for_updates',
125 require => File['/usr/local/bin/check_for_updates']
127 Exec['apt-get update']->Package<| tag == extra_repo |>