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',
41 file { '/etc/ssh/ssh_known_hosts':
45 source => 'puppet:///modules/debian-org/basic-ssh_known_hosts'
54 'libfilesystem-ruby1.8',
62 if $::lsbmajdistrelease >= 7 {
63 package { 'libfilesystem-ruby1.9.1':
88 if getfromhash($site::nodeinfo, 'broken-rtc') {
89 package { 'fake-hwclock':
95 package { 'molly-guard':
98 file { '/etc/molly-guard/run.d/10-check-kvm':
100 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
101 require => Package['molly-guard'],
103 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
105 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
106 require => Package['molly-guard'],
109 file { '/etc/apt/trusted-keys.d':
114 file { '/etc/apt/trusted.gpg':
119 site::aptrepo { 'security':
120 url => 'http://security.debian.org/',
121 suite => "${::lsbdistcodename}/updates",
122 components => ['main','contrib','non-free']
124 if $::lsbmajdistrelease < 7 {
125 site::aptrepo { 'debian-lts':
127 suite => "${::lsbdistcodename}-lts",
128 components => ['main','contrib','non-free']
131 site::aptrepo { 'debian-lts':
136 site::aptrepo { 'backports.debian.org':
137 url => $mirror_backports,
138 suite => "${::lsbdistcodename}-backports",
139 components => ['main','contrib','non-free']
142 site::aptrepo { 'volatile':
144 suite => "${::lsbdistcodename}-updates",
145 components => ['main','contrib','non-free']
148 #if ($::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, rem, pettersson]) or
149 # ($::hoster and ($::hoster in [bytemark, man-da, brown])) {
150 # site::aptrepo { 'proposed-updates':
152 # suite => "${::lsbdistcodename}-proposed-updates",
153 # components => ['main','contrib','non-free']
156 site::aptrepo { 'proposed-updates':
161 site::aptrepo { 'debian.org':
165 site::aptrepo { 'db.debian.org':
166 url => 'http://db.debian.org/debian-admin',
167 suite => 'debian-all',
168 components => 'main',
169 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
171 site::aptrepo { 'db.debian.org-suite':
172 url => 'http://db.debian.org/debian-admin',
173 suite => $::lsbdistcodename,
174 components => 'main',
177 augeas { 'inittab_replicate':
178 context => '/files/etc/inittab',
180 'set ud/runlevels 2345',
181 'set ud/action respawn',
182 'set ud/process "/usr/bin/ud-replicated -d"',
184 notify => Exec['init q'],
187 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
188 site::aptrepo { 'debian':
189 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
190 suite => $::lsbdistcodename,
191 components => ['main','contrib','non-free']
195 file { '/etc/facter':
200 source => 'puppet:///files/empty/',
202 file { '/etc/facter/facts.d':
205 file { '/etc/facter/facts.d/debian_facts.yaml':
206 content => template('debian-org/debian_facts.yaml.erb')
208 file { '/etc/apt/preferences':
209 source => 'puppet:///modules/debian-org/apt.preferences',
211 file { '/etc/apt/apt.conf.d/local-compression':
212 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
214 file { '/etc/apt/apt.conf.d/local-recommends':
215 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
217 file { '/etc/apt/apt.conf.d/local-pdiffs':
218 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
220 file { '/etc/timezone':
221 source => 'puppet:///modules/debian-org/timezone',
222 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
224 if $::hostname == handel {
225 include puppetmaster::db
226 $dbpassword = $puppetmaster::db::password
228 file { '/etc/puppet/puppet.conf':
229 content => template('debian-org/puppet.conf.erb'),
231 file { '/etc/default/puppet':
232 source => 'puppet:///modules/debian-org/puppet.default',
234 file { '/etc/cron.d/dsa-puppet-stuff':
235 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
236 require => Package['debian.org'],
238 file { '/etc/ldap/ldap.conf':
239 require => Package['debian.org'],
240 source => 'puppet:///modules/debian-org/ldap.conf',
242 file { '/etc/pam.d/common-session':
243 require => Package['debian.org'],
244 content => template('debian-org/pam.common-session.erb'),
246 file { '/etc/pam.d/common-session-noninteractive':
247 require => Package['debian.org'],
248 content => template('debian-org/pam.common-session-noninteractive.erb'),
250 file { '/etc/rc.local':
252 source => 'puppet:///modules/debian-org/rc.local',
253 notify => Exec['rc.local start'],
259 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
260 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
261 require => Package['debian.org']
263 file { '/etc/nsswitch.conf':
265 source => 'puppet:///modules/debian-org/nsswitch.conf',
268 # set mmap_min_addr to 4096 to mitigate
269 # Linux NULL-pointer dereference exploits
270 site::sysctl { 'mmap_min_addr':
273 site::sysctl { 'perf_event_paranoid':
274 key => 'kernel.perf_event_paranoid',
277 site::alternative { 'editor':
278 linkto => '/usr/bin/vim.basic',
280 site::alternative { 'view':
281 linkto => '/usr/bin/vim.basic',
283 mailalias { 'samhain-reports':
285 recipient => $debianadmin,
286 require => Package['debian.org']
289 file { '/usr/local/bin/check_for_updates':
290 source => 'puppet:///modules/debian-org/check_for_updates',
296 exec { 'apt-get update':
297 path => '/usr/bin:/usr/sbin:/bin:/sbin',
298 onlyif => '/usr/local/bin/check_for_updates',
299 require => File['/usr/local/bin/check_for_updates']
301 Exec['apt-get update']->Package<| tag == extra_repo |>
303 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
304 path => '/usr/bin:/usr/sbin:/bin:/sbin',
307 exec { 'puppetmaster restart':
308 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
311 exec { 'rc.local start':
312 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
319 tidy { '/var/lib/puppet/clientbucket/':
323 matches => [ 'paths', 'contents' ],
327 file { '/root/.bashrc':
328 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
330 file { '/root/.profile':
331 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
333 file { '/root/.screenrc':
334 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
336 file { '/root/.vimrc':
337 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',