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/systemd/system/puppet.service':
241 target => '/dev/null',
242 notify => Exec['systemctl daemon-reload'],
243 onlyif => "test -d /etc/systemd/system",
246 file { '/etc/cron.d/dsa-puppet-stuff':
247 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
248 require => Package['debian.org'],
250 file { '/etc/ldap/ldap.conf':
251 require => Package['debian.org'],
252 source => 'puppet:///modules/debian-org/ldap.conf',
254 file { '/etc/pam.d/common-session':
255 require => Package['debian.org'],
256 content => template('debian-org/pam.common-session.erb'),
258 file { '/etc/pam.d/common-session-noninteractive':
259 require => Package['debian.org'],
260 content => template('debian-org/pam.common-session-noninteractive.erb'),
262 file { '/etc/rc.local':
264 source => 'puppet:///modules/debian-org/rc.local',
265 notify => Exec['service rc.local start'],
271 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
272 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
273 require => Package['debian.org']
275 file { '/etc/nsswitch.conf':
277 source => 'puppet:///modules/debian-org/nsswitch.conf',
280 # set mmap_min_addr to 4096 to mitigate
281 # Linux NULL-pointer dereference exploits
282 site::sysctl { 'mmap_min_addr':
285 site::sysctl { 'perf_event_paranoid':
286 key => 'kernel.perf_event_paranoid',
289 site::alternative { 'editor':
290 linkto => '/usr/bin/vim.basic',
292 site::alternative { 'view':
293 linkto => '/usr/bin/vim.basic',
295 mailalias { 'samhain-reports':
297 recipient => $debianadmin,
298 require => Package['debian.org']
301 file { '/usr/local/bin/check_for_updates':
302 source => 'puppet:///modules/debian-org/check_for_updates',
308 exec { 'apt-get update':
309 path => '/usr/bin:/usr/sbin:/bin:/sbin',
310 onlyif => '/usr/local/bin/check_for_updates',
311 require => File['/usr/local/bin/check_for_updates']
313 Exec['apt-get update']->Package<| tag == extra_repo |>
315 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
316 path => '/usr/bin:/usr/sbin:/bin:/sbin',
319 exec { 'service puppetmaster restart':
322 exec { 'service rc.local start':
329 exec { 'systemctl daemon-reload':
331 onlyif => "test -x /bin/systemctl"
334 tidy { '/var/lib/puppet/clientbucket/':
338 matches => [ 'paths', 'contents' ],
342 file { '/root/.bashrc':
343 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
345 file { '/root/.profile':
346 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
348 file { '/root/.screenrc':
349 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
351 file { '/root/.vimrc':
352 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',