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
19 $servicefiles = 'present'
21 $servicefiles = 'absent'
25 'debian-archive-debian-samhain-reports@master.debian.org',
26 'debian-admin@ftbfs.de',
29 'paravoid@debian.org',
49 file { '/etc/ssh/ssh_known_hosts':
53 source => 'puppet:///modules/debian-org/basic-ssh_known_hosts'
62 'libfilesystem-ruby1.8',
70 if $::lsbmajdistrelease == 7 {
71 package { 'libfilesystem-ruby1.9.1':
74 } elsif $::lsbmajdistrelease >= 8 {
75 package { 'ruby-filesystem':
100 if getfromhash($site::nodeinfo, 'broken-rtc') {
101 package { 'fake-hwclock':
107 package { 'molly-guard':
110 file { '/etc/molly-guard/run.d/10-check-kvm':
112 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
113 require => Package['molly-guard'],
115 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
117 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
118 require => Package['molly-guard'],
121 file { '/etc/apt/trusted-keys.d':
126 file { '/etc/apt/trusted.gpg':
131 site::aptrepo { 'security':
132 url => 'http://security.debian.org/',
133 suite => "${::lsbdistcodename}/updates",
134 components => ['main','contrib','non-free']
136 if $::lsbmajdistrelease < 7 {
137 site::aptrepo { 'debian-lts':
139 suite => "${::lsbdistcodename}-lts",
140 components => ['main','contrib','non-free']
143 site::aptrepo { 'debian-lts':
148 site::aptrepo { 'backports.debian.org':
149 url => $mirror_backports,
150 suite => "${::lsbdistcodename}-backports",
151 components => ['main','contrib','non-free']
154 site::aptrepo { 'volatile':
156 suite => "${::lsbdistcodename}-updates",
157 components => ['main','contrib','non-free']
160 #if ($::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, pettersson]) or
161 # ($::hoster and ($::hoster in [bytemark, man-da, brown])) {
162 # site::aptrepo { 'proposed-updates':
164 # suite => "${::lsbdistcodename}-proposed-updates",
165 # components => ['main','contrib','non-free']
168 site::aptrepo { 'proposed-updates':
173 site::aptrepo { 'debian.org':
177 site::aptrepo { 'db.debian.org':
178 url => 'http://db.debian.org/debian-admin',
179 suite => 'debian-all',
180 components => 'main',
181 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
183 site::aptrepo { 'db.debian.org-suite':
184 url => 'http://db.debian.org/debian-admin',
185 suite => $::lsbdistcodename,
186 components => 'main',
189 augeas { 'inittab_replicate':
190 context => '/files/etc/inittab',
192 'set ud/runlevels 2345',
193 'set ud/action respawn',
194 'set ud/process "/usr/bin/ud-replicated -d"',
196 notify => Exec['init q'],
199 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
200 site::aptrepo { 'debian':
201 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
202 suite => $::lsbdistcodename,
203 components => ['main','contrib','non-free']
207 file { '/etc/facter':
212 source => 'puppet:///files/empty/',
214 file { '/etc/facter/facts.d':
217 file { '/etc/facter/facts.d/debian_facts.yaml':
218 content => template('debian-org/debian_facts.yaml.erb')
220 file { '/etc/apt/preferences':
221 source => 'puppet:///modules/debian-org/apt.preferences',
223 file { '/etc/apt/apt.conf.d/local-compression':
224 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
226 file { '/etc/apt/apt.conf.d/local-recommends':
227 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
229 file { '/etc/apt/apt.conf.d/local-pdiffs':
230 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
232 file { '/etc/timezone':
233 source => 'puppet:///modules/debian-org/timezone',
234 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
236 if $::hostname == handel {
237 include puppetmaster::db
238 $dbpassword = $puppetmaster::db::password
240 file { '/etc/puppet/puppet.conf':
241 content => template('debian-org/puppet.conf.erb'),
243 file { '/etc/default/puppet':
244 source => 'puppet:///modules/debian-org/puppet.default',
246 file { '/etc/systemd':
250 file { '/etc/systemd/system':
254 file { '/etc/systemd/system/ud-replicated.service':
255 ensure => $servicefiles,
256 source => 'puppet:///modules/debian-org/ud-replicated.service',
257 notify => Exec['systemctl daemon-reload'],
260 file { '/etc/systemd/system/multi-user.target.wants/ud-replicated.service':
262 target => '../ud-replicated.service',
263 notify => Exec['systemctl daemon-reload'],
266 file { '/etc/systemd/system/puppet.service':
268 target => '/dev/null',
269 notify => Exec['systemctl daemon-reload'],
272 file { '/etc/cron.d/dsa-puppet-stuff':
273 content => template('debian-org/dsa-puppet-stuff.cron.erb'),
274 require => Package['debian.org'],
276 file { '/etc/ldap/ldap.conf':
277 require => Package['debian.org'],
278 source => 'puppet:///modules/debian-org/ldap.conf',
280 file { '/etc/pam.d/common-session':
281 require => Package['debian.org'],
282 content => template('debian-org/pam.common-session.erb'),
284 file { '/etc/pam.d/common-session-noninteractive':
285 require => Package['debian.org'],
286 content => template('debian-org/pam.common-session-noninteractive.erb'),
288 file { '/etc/rc.local':
290 content => template('debian-org/rc.local.erb'),
291 notify => Exec['service rc.local start'],
297 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
298 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
299 require => Package['debian.org']
301 file { '/etc/nsswitch.conf':
303 source => 'puppet:///modules/debian-org/nsswitch.conf',
306 # set mmap_min_addr to 4096 to mitigate
307 # Linux NULL-pointer dereference exploits
308 site::sysctl { 'mmap_min_addr':
311 site::sysctl { 'perf_event_paranoid':
312 key => 'kernel.perf_event_paranoid',
315 site::alternative { 'editor':
316 linkto => '/usr/bin/vim.basic',
318 site::alternative { 'view':
319 linkto => '/usr/bin/vim.basic',
321 mailalias { 'samhain-reports':
323 recipient => $debianadmin,
324 require => Package['debian.org']
327 file { '/usr/local/bin/check_for_updates':
328 source => 'puppet:///modules/debian-org/check_for_updates',
334 exec { 'apt-get update':
335 path => '/usr/bin:/usr/sbin:/bin:/sbin',
336 onlyif => '/usr/local/bin/check_for_updates',
337 require => File['/usr/local/bin/check_for_updates']
339 Exec['apt-get update']->Package<| tag == extra_repo |>
341 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
342 path => '/usr/bin:/usr/sbin:/bin:/sbin',
345 exec { 'service puppetmaster restart':
348 exec { 'service rc.local start':
355 exec { 'systemctl daemon-reload':
357 onlyif => "test -x /bin/systemctl"
360 tidy { '/var/lib/puppet/clientbucket/':
364 matches => [ 'paths', 'contents' ],
368 file { '/root/.bashrc':
369 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
371 file { '/root/.profile':
372 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
374 file { '/root/.screenrc':
375 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
377 file { '/root/.vimrc':
378 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',