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://ftp.debian.org/debian/'
11 if $::lsbmajdistrelease < 7 {
12 $mirror_backports = 'http://backports.debian.org/debian-backports/'
14 $mirror_backports = $mirror
18 $servicefiles = 'present'
20 $servicefiles = 'absent'
24 'debian-archive-debian-samhain-reports@master.debian.org',
25 'debian-admin@ftbfs.de',
28 'paravoid@debian.org',
48 file { '/etc/ssh/ssh_known_hosts':
52 source => 'puppet:///modules/debian-org/basic-ssh_known_hosts'
61 'libfilesystem-ruby1.8',
69 if $::lsbmajdistrelease == 7 {
70 package { 'libfilesystem-ruby1.9.1':
73 } elsif $::lsbmajdistrelease >= 8 {
74 package { 'ruby-filesystem':
99 if getfromhash($site::nodeinfo, 'broken-rtc') {
100 package { 'fake-hwclock':
106 package { 'molly-guard':
109 file { '/etc/molly-guard/run.d/10-check-kvm':
111 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
112 require => Package['molly-guard'],
114 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
116 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
117 require => Package['molly-guard'],
120 file { '/etc/apt/trusted-keys.d':
125 file { '/etc/apt/trusted.gpg':
130 site::aptrepo { 'security':
131 url => 'http://security.debian.org/',
132 suite => "${::lsbdistcodename}/updates",
133 components => ['main','contrib','non-free']
135 if $::lsbmajdistrelease < 7 {
136 site::aptrepo { 'debian-lts':
138 suite => "${::lsbdistcodename}-lts",
139 components => ['main','contrib','non-free']
142 site::aptrepo { 'debian-lts':
147 site::aptrepo { 'backports.debian.org':
148 url => $mirror_backports,
149 suite => "${::lsbdistcodename}-backports",
150 components => ['main','contrib','non-free']
153 site::aptrepo { 'volatile':
155 suite => "${::lsbdistcodename}-updates",
156 components => ['main','contrib','non-free']
159 #if ($::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, pettersson]) or
160 # ($::hoster and ($::hoster in [bytemark, man-da, brown])) {
161 # site::aptrepo { 'proposed-updates':
163 # suite => "${::lsbdistcodename}-proposed-updates",
164 # components => ['main','contrib','non-free']
167 site::aptrepo { 'proposed-updates':
172 site::aptrepo { 'debian.org':
176 site::aptrepo { 'db.debian.org':
177 url => 'http://db.debian.org/debian-admin',
178 suite => 'debian-all',
179 components => 'main',
180 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
182 site::aptrepo { 'db.debian.org-suite':
183 url => 'http://db.debian.org/debian-admin',
184 suite => $::lsbdistcodename,
185 components => 'main',
188 augeas { 'inittab_replicate':
189 context => '/files/etc/inittab',
191 'set ud/runlevels 2345',
192 'set ud/action respawn',
193 'set ud/process "/usr/bin/ud-replicated -d"',
195 notify => Exec['init q'],
198 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
199 site::aptrepo { 'debian':
200 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
201 suite => $::lsbdistcodename,
202 components => ['main','contrib','non-free']
206 file { '/etc/facter':
211 source => 'puppet:///files/empty/',
213 file { '/etc/facter/facts.d':
216 file { '/etc/facter/facts.d/debian_facts.yaml':
217 content => template('debian-org/debian_facts.yaml.erb')
219 file { '/etc/apt/preferences':
220 source => 'puppet:///modules/debian-org/apt.preferences',
222 file { '/etc/apt/apt.conf.d/local-compression':
223 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
225 file { '/etc/apt/apt.conf.d/local-recommends':
226 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
228 file { '/etc/apt/apt.conf.d/local-pdiffs':
229 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
231 file { '/etc/timezone':
232 source => 'puppet:///modules/debian-org/timezone',
233 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
235 if $::hostname == handel {
236 include puppetmaster::db
237 $dbpassword = $puppetmaster::db::password
239 file { '/etc/puppet/puppet.conf':
240 content => template('debian-org/puppet.conf.erb'),
242 file { '/etc/default/puppet':
243 source => 'puppet:///modules/debian-org/puppet.default',
245 file { '/etc/systemd':
249 file { '/etc/systemd/system':
253 file { '/etc/systemd/system/ud-replicated.service':
254 ensure => $servicefiles,
255 source => 'puppet:///modules/debian-org/ud-replicated.service',
256 notify => Exec['systemctl daemon-reload'],
259 file { '/etc/systemd/system/multi-user.target.wants/ud-replicated.service':
261 target => '../ud-replicated.service',
262 notify => Exec['systemctl daemon-reload'],
265 file { '/etc/systemd/system/puppet.service':
267 target => '/dev/null',
268 notify => Exec['systemctl daemon-reload'],
271 file { '/etc/cron.d/dsa-puppet-stuff':
272 content => template('debian-org/dsa-puppet-stuff.cron.erb'),
273 require => Package['debian.org'],
275 file { '/etc/ldap/ldap.conf':
276 require => Package['debian.org'],
277 source => 'puppet:///modules/debian-org/ldap.conf',
279 file { '/etc/pam.d/common-session':
280 require => Package['debian.org'],
281 content => template('debian-org/pam.common-session.erb'),
283 file { '/etc/pam.d/common-session-noninteractive':
284 require => Package['debian.org'],
285 content => template('debian-org/pam.common-session-noninteractive.erb'),
287 file { '/etc/rc.local':
289 source => 'puppet:///modules/debian-org/rc.local',
290 notify => Exec['service rc.local start'],
296 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
297 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
298 require => Package['debian.org']
300 file { '/etc/nsswitch.conf':
302 source => 'puppet:///modules/debian-org/nsswitch.conf',
305 # set mmap_min_addr to 4096 to mitigate
306 # Linux NULL-pointer dereference exploits
307 site::sysctl { 'mmap_min_addr':
310 site::sysctl { 'perf_event_paranoid':
311 key => 'kernel.perf_event_paranoid',
314 site::alternative { 'editor':
315 linkto => '/usr/bin/vim.basic',
317 site::alternative { 'view':
318 linkto => '/usr/bin/vim.basic',
320 mailalias { 'samhain-reports':
322 recipient => $debianadmin,
323 require => Package['debian.org']
326 file { '/usr/local/bin/check_for_updates':
327 source => 'puppet:///modules/debian-org/check_for_updates',
333 exec { 'apt-get update':
334 path => '/usr/bin:/usr/sbin:/bin:/sbin',
335 onlyif => '/usr/local/bin/check_for_updates',
336 require => File['/usr/local/bin/check_for_updates']
338 Exec['apt-get update']->Package<| tag == extra_repo |>
340 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
341 path => '/usr/bin:/usr/sbin:/bin:/sbin',
344 exec { 'service puppetmaster restart':
347 exec { 'service rc.local start':
354 exec { 'systemctl daemon-reload':
356 onlyif => "test -x /bin/systemctl"
359 tidy { '/var/lib/puppet/clientbucket/':
363 matches => [ 'paths', 'contents' ],
367 file { '/root/.bashrc':
368 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
370 file { '/root/.profile':
371 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
373 file { '/root/.screenrc':
374 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
376 file { '/root/.vimrc':
377 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',