3 # Stuff common to all debian.org servers
6 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
7 $mirror = getfromhash($site::nodeinfo, 'hoster', 'mirror-debian')
9 $mirror = 'http://http.debian.net/debian/'
11 if $::lsbmajdistrelease < 7 {
12 $mirror_backports = 'http://backports.debian.org/debian-backports/'
14 $mirror_backports = $mirror
18 'debian-archive-debian-samhain-reports@master.debian.org',
19 'debian-admin@ftbfs.de',
22 'paravoid@debian.org',
42 file { '/etc/ssh/ssh_known_hosts':
46 source => 'puppet:///modules/debian-org/basic-ssh_known_hosts'
55 'libfilesystem-ruby1.8',
63 if $::lsbmajdistrelease == 7 {
64 package { 'libfilesystem-ruby1.9.1':
67 } elsif $::lsbmajdistrelease >= 8 {
68 package { 'ruby-filesystem':
93 if getfromhash($site::nodeinfo, 'broken-rtc') {
94 package { 'fake-hwclock':
100 package { 'molly-guard':
103 file { '/etc/molly-guard/run.d/10-check-kvm':
105 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
106 require => Package['molly-guard'],
108 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
110 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
111 require => Package['molly-guard'],
114 file { '/etc/apt/trusted-keys.d':
119 file { '/etc/apt/trusted.gpg':
124 site::aptrepo { 'security':
125 url => 'http://security.debian.org/',
126 suite => "${::lsbdistcodename}/updates",
127 components => ['main','contrib','non-free']
129 if $::lsbmajdistrelease < 7 {
130 site::aptrepo { 'debian-lts':
132 suite => "${::lsbdistcodename}-lts",
133 components => ['main','contrib','non-free']
136 site::aptrepo { 'debian-lts':
141 site::aptrepo { 'backports.debian.org':
142 url => $mirror_backports,
143 suite => "${::lsbdistcodename}-backports",
144 components => ['main','contrib','non-free']
147 site::aptrepo { 'volatile':
149 suite => "${::lsbdistcodename}-updates",
150 components => ['main','contrib','non-free']
153 #if ($::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, pettersson]) or
154 # ($::hoster and ($::hoster in [bytemark, man-da, brown])) {
155 # site::aptrepo { 'proposed-updates':
157 # suite => "${::lsbdistcodename}-proposed-updates",
158 # components => ['main','contrib','non-free']
161 site::aptrepo { 'proposed-updates':
166 site::aptrepo { 'debian.org':
170 site::aptrepo { 'db.debian.org':
171 url => 'http://db.debian.org/debian-admin',
172 suite => 'debian-all',
173 components => 'main',
174 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
176 site::aptrepo { 'db.debian.org-suite':
177 url => 'http://db.debian.org/debian-admin',
178 suite => $::lsbdistcodename,
179 components => 'main',
182 augeas { 'inittab_replicate':
183 context => '/files/etc/inittab',
185 'set ud/runlevels 2345',
186 'set ud/action respawn',
187 'set ud/process "/usr/bin/ud-replicated -d"',
189 notify => Exec['init q'],
192 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
193 site::aptrepo { 'debian':
194 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
195 suite => $::lsbdistcodename,
196 components => ['main','contrib','non-free']
200 file { '/etc/facter':
205 source => 'puppet:///files/empty/',
207 file { '/etc/facter/facts.d':
210 file { '/etc/facter/facts.d/debian_facts.yaml':
211 content => template('debian-org/debian_facts.yaml.erb')
213 file { '/etc/apt/preferences':
214 source => 'puppet:///modules/debian-org/apt.preferences',
216 file { '/etc/apt/apt.conf.d/local-compression':
217 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
219 file { '/etc/apt/apt.conf.d/local-recommends':
220 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
222 file { '/etc/apt/apt.conf.d/local-pdiffs':
223 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
225 file { '/etc/timezone':
226 source => 'puppet:///modules/debian-org/timezone',
227 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
229 if $::hostname == handel {
230 include puppetmaster::db
231 $dbpassword = $puppetmaster::db::password
233 file { '/etc/puppet/puppet.conf':
234 content => template('debian-org/puppet.conf.erb'),
236 file { '/etc/default/puppet':
237 source => 'puppet:///modules/debian-org/puppet.default',
239 file { '/etc/cron.d/dsa-puppet-stuff':
240 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
241 require => Package['debian.org'],
243 file { '/etc/ldap/ldap.conf':
244 require => Package['debian.org'],
245 source => 'puppet:///modules/debian-org/ldap.conf',
247 file { '/etc/pam.d/common-session':
248 require => Package['debian.org'],
249 content => template('debian-org/pam.common-session.erb'),
251 file { '/etc/pam.d/common-session-noninteractive':
252 require => Package['debian.org'],
253 content => template('debian-org/pam.common-session-noninteractive.erb'),
255 file { '/etc/rc.local':
257 source => 'puppet:///modules/debian-org/rc.local',
258 notify => Exec['service rc.local start'],
264 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
265 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
266 require => Package['debian.org']
268 file { '/etc/nsswitch.conf':
270 source => 'puppet:///modules/debian-org/nsswitch.conf',
273 # set mmap_min_addr to 4096 to mitigate
274 # Linux NULL-pointer dereference exploits
275 site::sysctl { 'mmap_min_addr':
278 site::sysctl { 'perf_event_paranoid':
279 key => 'kernel.perf_event_paranoid',
282 site::alternative { 'editor':
283 linkto => '/usr/bin/vim.basic',
285 site::alternative { 'view':
286 linkto => '/usr/bin/vim.basic',
288 mailalias { 'samhain-reports':
290 recipient => $debianadmin,
291 require => Package['debian.org']
294 file { '/usr/local/bin/check_for_updates':
295 source => 'puppet:///modules/debian-org/check_for_updates',
301 exec { 'apt-get update':
302 path => '/usr/bin:/usr/sbin:/bin:/sbin',
303 onlyif => '/usr/local/bin/check_for_updates',
304 require => File['/usr/local/bin/check_for_updates']
306 Exec['apt-get update']->Package<| tag == extra_repo |>
308 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
309 path => '/usr/bin:/usr/sbin:/bin:/sbin',
312 exec { 'service puppetmaster restart':
315 exec { 'service rc.local start':
322 tidy { '/var/lib/puppet/clientbucket/':
326 matches => [ 'paths', 'contents' ],
330 file { '/root/.bashrc':
331 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
333 file { '/root/.profile':
334 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
336 file { '/root/.screenrc':
337 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
339 file { '/root/.vimrc':
340 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',