3 # Stuff common to all debian.org servers
6 include debian_org::apt
10 $servicefiles = 'present'
12 $servicefiles = 'absent'
15 # the virtual facter needs virt-what on jessie to work
16 if versioncmp($::lsbmajdistrelease, '9') < 0 {
17 package { 'virt-what': ensure => installed }
19 package { 'virt-what': ensure => purged }
23 'debian-archive-debian-samhain-reports@master.debian.org',
24 'debian-admin@ftbfs.de',
42 'debian.org-recommended',
49 file { '/etc/ssh/ssh_known_hosts':
53 source => 'puppet:///modules/debian_org/basic-ssh_known_hosts'
56 if versioncmp($::lsbmajdistrelease, '8') >= 0 {
57 $rubyfs_package = 'ruby-filesystem'
59 $rubyfs_package = 'libfilesystem-ruby1.9'
94 if getfromhash($site::nodeinfo, 'broken-rtc') {
95 package { 'fake-hwclock':
101 package { 'molly-guard':
104 file { '/etc/molly-guard/run.d/10-check-kvm':
106 source => 'puppet:///modules/debian_org/molly-guard/10-check-kvm',
107 require => Package['molly-guard'],
109 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
111 source => 'puppet:///modules/debian_org/molly-guard/15-acquire-reboot-lock',
112 require => Package['molly-guard'],
115 augeas { 'inittab_replicate':
116 context => '/files/etc/inittab',
118 'set ud/runlevels 2345',
119 'set ud/action respawn',
120 'set ud/process "/usr/bin/ud-replicated -d"',
122 notify => Exec['init q'],
126 file { '/etc/facter':
131 source => 'puppet:///files/empty/',
133 file { '/etc/facter/facts.d':
136 file { '/etc/facter/facts.d/debian_facts.yaml':
137 content => template('debian_org/debian_facts.yaml.erb')
139 file { '/etc/timezone':
140 source => 'puppet:///modules/debian_org/timezone',
141 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
143 if $::hostname == handel {
144 include puppetmaster::db
145 $dbpassword = $puppetmaster::db::password
147 file { '/etc/puppet/puppet.conf':
148 content => template('debian_org/puppet.conf.erb'),
152 file { '/etc/default/puppet':
153 source => 'puppet:///modules/debian_org/puppet.default',
155 file { '/etc/systemd':
159 file { '/etc/systemd/system':
163 file { '/etc/systemd/system/ud-replicated.service':
164 ensure => $servicefiles,
165 source => 'puppet:///modules/debian_org/ud-replicated.service',
166 notify => Exec['systemctl daemon-reload'],
169 file { '/etc/systemd/system/multi-user.target.wants/ud-replicated.service':
171 target => '../ud-replicated.service',
172 notify => Exec['systemctl daemon-reload'],
175 file { '/etc/systemd/system/puppet.service':
177 target => '/dev/null',
178 notify => Exec['systemctl daemon-reload'],
180 file { '/etc/systemd/system/proc-sys-fs-binfmt_misc.automount':
182 target => '/dev/null',
183 notify => Exec['systemctl daemon-reload'],
186 file { '/etc/cron.d/dsa-puppet-stuff':
187 content => template('debian_org/dsa-puppet-stuff.cron.erb'),
188 require => Package['debian.org'],
190 file { '/etc/ldap/ldap.conf':
191 require => Package['debian.org'],
192 content => template('debian_org/ldap.conf.erb'),
194 file { '/etc/pam.d/common-session':
195 require => Package['debian.org'],
196 content => template('debian_org/pam.common-session.erb'),
198 file { '/etc/pam.d/common-session-noninteractive':
199 require => Package['debian.org'],
200 content => template('debian_org/pam.common-session-noninteractive.erb'),
202 file { '/etc/rc.local':
204 content => template('debian_org/rc.local.erb'),
205 notify => Exec['service rc.local restart'],
211 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
212 source => 'puppet:///modules/debian_org/dsa-puppet-stuff.cron.ignore',
213 require => Package['debian.org']
215 file { '/etc/nsswitch.conf':
217 source => 'puppet:///modules/debian_org/nsswitch.conf',
220 file { '/etc/profile.d/timeout.sh':
222 source => 'puppet:///modules/debian_org/etc.profile.d/timeout.sh',
227 file { '/etc/zsh/zprofile':
229 source => 'puppet:///modules/debian_org/etc.zsh/zprofile',
232 # set mmap_min_addr to 4096 to mitigate
233 # Linux NULL-pointer dereference exploits
234 site::sysctl { 'mmap_min_addr':
237 site::sysctl { 'perf_event_paranoid':
238 key => 'kernel.perf_event_paranoid',
241 site::sysctl { 'puppet-vfs_cache_pressure':
242 key => 'vm.vfs_cache_pressure',
245 site::alternative { 'editor':
246 linkto => '/usr/bin/vim.basic',
248 site::alternative { 'view':
249 linkto => '/usr/bin/vim.basic',
251 mailalias { 'samhain-reports':
253 recipient => $debianadmin,
254 require => Package['debian.org']
257 file { '/usr/local/bin/check_for_updates':
258 source => 'puppet:///modules/debian_org/check_for_updates',
263 file { '/usr/local/bin/dsa-is-shutdown-scheduled':
264 source => 'puppet:///modules/debian_org/dsa-is-shutdown-scheduled',
268 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
269 path => '/usr/bin:/usr/sbin:/bin:/sbin',
272 exec { 'service puppetmaster restart':
275 exec { 'service rc.local restart':
282 exec { 'systemctl daemon-reload':
284 onlyif => "test -x /bin/systemctl"
287 exec { 'systemd-tmpfiles --create --exclude-prefix=/dev':
289 onlyif => "test -x /bin/systemd-tmpfiles"
292 tidy { '/var/lib/puppet/clientbucket/':
296 matches => [ 'paths', 'contents' ],
300 file { '/root/.bashrc':
301 source => 'puppet:///modules/debian_org/root-dotfiles/bashrc',
303 file { '/root/.profile':
304 source => 'puppet:///modules/debian_org/root-dotfiles/profile',
306 file { '/root/.selected_editor':
307 source => 'puppet:///modules/debian_org/root-dotfiles/selected_editor',
309 file { '/root/.screenrc':
310 source => 'puppet:///modules/debian_org/root-dotfiles/screenrc',
312 file { '/root/.tmux.conf':
313 source => 'puppet:///modules/debian_org/root-dotfiles/tmux.conf',
315 file { '/root/.vimrc':
316 source => 'puppet:///modules/debian_org/root-dotfiles/vimrc',
319 if versioncmp($::lsbmajdistrelease, '9') >= 0 { # older puppets do facts as strings.
320 if $::processorcount > 1 {
321 package { 'irqbalance': ensure => installed }