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 $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'],
258 file { '/etc/systemd/system/puppet.service':
260 target => '/dev/null',
261 notify => Exec['systemctl daemon-reload'],
264 file { '/etc/cron.d/dsa-puppet-stuff':
265 content => template('debian-org/dsa-puppet-stuff.cron.erb'),
266 require => Package['debian.org'],
268 file { '/etc/ldap/ldap.conf':
269 require => Package['debian.org'],
270 source => 'puppet:///modules/debian-org/ldap.conf',
272 file { '/etc/pam.d/common-session':
273 require => Package['debian.org'],
274 content => template('debian-org/pam.common-session.erb'),
276 file { '/etc/pam.d/common-session-noninteractive':
277 require => Package['debian.org'],
278 content => template('debian-org/pam.common-session-noninteractive.erb'),
280 file { '/etc/rc.local':
282 source => 'puppet:///modules/debian-org/rc.local',
283 notify => Exec['service rc.local start'],
289 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
290 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
291 require => Package['debian.org']
293 file { '/etc/nsswitch.conf':
295 source => 'puppet:///modules/debian-org/nsswitch.conf',
298 # set mmap_min_addr to 4096 to mitigate
299 # Linux NULL-pointer dereference exploits
300 site::sysctl { 'mmap_min_addr':
303 site::sysctl { 'perf_event_paranoid':
304 key => 'kernel.perf_event_paranoid',
307 site::alternative { 'editor':
308 linkto => '/usr/bin/vim.basic',
310 site::alternative { 'view':
311 linkto => '/usr/bin/vim.basic',
313 mailalias { 'samhain-reports':
315 recipient => $debianadmin,
316 require => Package['debian.org']
319 file { '/usr/local/bin/check_for_updates':
320 source => 'puppet:///modules/debian-org/check_for_updates',
326 exec { 'apt-get update':
327 path => '/usr/bin:/usr/sbin:/bin:/sbin',
328 onlyif => '/usr/local/bin/check_for_updates',
329 require => File['/usr/local/bin/check_for_updates']
331 Exec['apt-get update']->Package<| tag == extra_repo |>
333 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
334 path => '/usr/bin:/usr/sbin:/bin:/sbin',
337 exec { 'service puppetmaster restart':
340 exec { 'service rc.local start':
347 exec { 'systemctl daemon-reload':
349 onlyif => "test -x /bin/systemctl"
352 tidy { '/var/lib/puppet/clientbucket/':
356 matches => [ 'paths', 'contents' ],
360 file { '/root/.bashrc':
361 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
363 file { '/root/.profile':
364 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
366 file { '/root/.screenrc':
367 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
369 file { '/root/.vimrc':
370 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',