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 != "testing/unstable" and $::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 == "testing/unstable" or $::lsbmajdistrelease >= 7 {
64 package { 'libfilesystem-ruby1.9.1':
89 if getfromhash($site::nodeinfo, 'broken-rtc') {
90 package { 'fake-hwclock':
96 package { 'molly-guard':
99 file { '/etc/molly-guard/run.d/10-check-kvm':
101 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
102 require => Package['molly-guard'],
104 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
106 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
107 require => Package['molly-guard'],
110 file { '/etc/apt/trusted-keys.d':
115 file { '/etc/apt/trusted.gpg':
120 site::aptrepo { 'security':
121 url => 'http://security.debian.org/',
122 suite => "${::lsbdistcodename}/updates",
123 components => ['main','contrib','non-free']
125 if $::lsbmajdistrelease != "testing/unstable" and $::lsbmajdistrelease < 7 {
126 site::aptrepo { 'debian-lts':
128 suite => "${::lsbdistcodename}-lts",
129 components => ['main','contrib','non-free']
132 site::aptrepo { 'debian-lts':
137 site::aptrepo { 'backports.debian.org':
138 url => $mirror_backports,
139 suite => "${::lsbdistcodename}-backports",
140 components => ['main','contrib','non-free']
143 site::aptrepo { 'volatile':
145 suite => "${::lsbdistcodename}-updates",
146 components => ['main','contrib','non-free']
149 #if ($::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, pettersson]) or
150 # ($::hoster and ($::hoster in [bytemark, man-da, brown])) {
151 # site::aptrepo { 'proposed-updates':
153 # suite => "${::lsbdistcodename}-proposed-updates",
154 # components => ['main','contrib','non-free']
157 site::aptrepo { 'proposed-updates':
162 site::aptrepo { 'debian.org':
166 site::aptrepo { 'db.debian.org':
167 url => 'http://db.debian.org/debian-admin',
168 suite => 'debian-all',
169 components => 'main',
170 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
172 site::aptrepo { 'db.debian.org-suite':
173 url => 'http://db.debian.org/debian-admin',
174 suite => $::lsbdistcodename,
175 components => 'main',
178 augeas { 'inittab_replicate':
179 context => '/files/etc/inittab',
181 'set ud/runlevels 2345',
182 'set ud/action respawn',
183 'set ud/process "/usr/bin/ud-replicated -d"',
185 notify => Exec['init q'],
188 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
189 site::aptrepo { 'debian':
190 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
191 suite => $::lsbdistcodename,
192 components => ['main','contrib','non-free']
196 file { '/etc/facter':
201 source => 'puppet:///files/empty/',
203 file { '/etc/facter/facts.d':
206 file { '/etc/facter/facts.d/debian_facts.yaml':
207 content => template('debian-org/debian_facts.yaml.erb')
209 file { '/etc/apt/preferences':
210 source => 'puppet:///modules/debian-org/apt.preferences',
212 file { '/etc/apt/apt.conf.d/local-compression':
213 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
215 file { '/etc/apt/apt.conf.d/local-recommends':
216 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
218 file { '/etc/apt/apt.conf.d/local-pdiffs':
219 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
221 file { '/etc/timezone':
222 source => 'puppet:///modules/debian-org/timezone',
223 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
225 if $::hostname == handel {
226 include puppetmaster::db
227 $dbpassword = $puppetmaster::db::password
229 file { '/etc/puppet/puppet.conf':
230 content => template('debian-org/puppet.conf.erb'),
232 file { '/etc/default/puppet':
233 source => 'puppet:///modules/debian-org/puppet.default',
235 file { '/etc/cron.d/dsa-puppet-stuff':
236 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
237 require => Package['debian.org'],
239 file { '/etc/ldap/ldap.conf':
240 require => Package['debian.org'],
241 source => 'puppet:///modules/debian-org/ldap.conf',
243 file { '/etc/pam.d/common-session':
244 require => Package['debian.org'],
245 content => template('debian-org/pam.common-session.erb'),
247 file { '/etc/pam.d/common-session-noninteractive':
248 require => Package['debian.org'],
249 content => template('debian-org/pam.common-session-noninteractive.erb'),
251 file { '/etc/rc.local':
253 source => 'puppet:///modules/debian-org/rc.local',
254 notify => Exec['service rc.local start'],
260 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
261 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
262 require => Package['debian.org']
264 file { '/etc/nsswitch.conf':
266 source => 'puppet:///modules/debian-org/nsswitch.conf',
269 # set mmap_min_addr to 4096 to mitigate
270 # Linux NULL-pointer dereference exploits
271 site::sysctl { 'mmap_min_addr':
274 site::sysctl { 'perf_event_paranoid':
275 key => 'kernel.perf_event_paranoid',
278 site::alternative { 'editor':
279 linkto => '/usr/bin/vim.basic',
281 site::alternative { 'view':
282 linkto => '/usr/bin/vim.basic',
284 mailalias { 'samhain-reports':
286 recipient => $debianadmin,
287 require => Package['debian.org']
290 file { '/usr/local/bin/check_for_updates':
291 source => 'puppet:///modules/debian-org/check_for_updates',
297 exec { 'apt-get update':
298 path => '/usr/bin:/usr/sbin:/bin:/sbin',
299 onlyif => '/usr/local/bin/check_for_updates',
300 require => File['/usr/local/bin/check_for_updates']
302 Exec['apt-get update']->Package<| tag == extra_repo |>
304 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
305 path => '/usr/bin:/usr/sbin:/bin:/sbin',
308 exec { 'service puppetmaster restart':
311 exec { 'service rc.local start':
318 tidy { '/var/lib/puppet/clientbucket/':
322 matches => [ 'paths', 'contents' ],
326 file { '/root/.bashrc':
327 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
329 file { '/root/.profile':
330 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
332 file { '/root/.screenrc':
333 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
335 file { '/root/.vimrc':
336 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',