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',
168 components => 'main',
169 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
172 augeas { 'inittab_replicate':
173 context => '/files/etc/inittab',
175 'set ud/runlevels 2345',
176 'set ud/action respawn',
177 'set ud/process "/usr/bin/ud-replicated -d"',
179 notify => Exec['init q'],
182 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
183 site::aptrepo { 'debian':
184 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
185 suite => $::lsbdistcodename,
186 components => ['main','contrib','non-free']
190 file { '/etc/facter':
195 source => 'puppet:///files/empty/',
197 file { '/etc/facter/facts.d':
200 file { '/etc/facter/facts.d/debian_facts.yaml':
201 content => template('debian-org/debian_facts.yaml.erb')
203 file { '/etc/apt/preferences':
204 source => 'puppet:///modules/debian-org/apt.preferences',
206 file { '/etc/apt/apt.conf.d/local-compression':
207 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
209 file { '/etc/apt/apt.conf.d/local-recommends':
210 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
212 file { '/etc/apt/apt.conf.d/local-pdiffs':
213 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
215 file { '/etc/timezone':
216 source => 'puppet:///modules/debian-org/timezone',
217 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
219 if $::hostname == handel {
220 include puppetmaster::db
221 $dbpassword = $puppetmaster::db::password
223 file { '/etc/puppet/puppet.conf':
224 content => template('debian-org/puppet.conf.erb'),
226 file { '/etc/default/puppet':
227 source => 'puppet:///modules/debian-org/puppet.default',
229 file { '/etc/cron.d/dsa-puppet-stuff':
230 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
231 require => Package['debian.org'],
233 file { '/etc/ldap/ldap.conf':
234 require => Package['debian.org'],
235 source => 'puppet:///modules/debian-org/ldap.conf',
237 file { '/etc/pam.d/common-session':
238 require => Package['debian.org'],
239 content => template('debian-org/pam.common-session.erb'),
241 file { '/etc/pam.d/common-session-noninteractive':
242 require => Package['debian.org'],
243 content => template('debian-org/pam.common-session-noninteractive.erb'),
245 file { '/etc/rc.local':
247 source => 'puppet:///modules/debian-org/rc.local',
248 notify => Exec['rc.local start'],
254 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
255 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
256 require => Package['debian.org']
258 file { '/etc/nsswitch.conf':
260 source => 'puppet:///modules/debian-org/nsswitch.conf',
263 # set mmap_min_addr to 4096 to mitigate
264 # Linux NULL-pointer dereference exploits
265 site::sysctl { 'mmap_min_addr':
268 site::sysctl { 'perf_event_paranoid':
269 key => 'kernel.perf_event_paranoid',
272 site::alternative { 'editor':
273 linkto => '/usr/bin/vim.basic',
275 site::alternative { 'view':
276 linkto => '/usr/bin/vim.basic',
278 mailalias { 'samhain-reports':
280 recipient => $debianadmin,
281 require => Package['debian.org']
284 file { '/usr/local/bin/check_for_updates':
285 source => 'puppet:///modules/debian-org/check_for_updates',
291 exec { 'apt-get update':
292 path => '/usr/bin:/usr/sbin:/bin:/sbin',
293 onlyif => '/usr/local/bin/check_for_updates',
294 require => File['/usr/local/bin/check_for_updates']
296 Exec['apt-get update']->Package<| tag == extra_repo |>
298 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
299 path => '/usr/bin:/usr/sbin:/bin:/sbin',
302 exec { 'puppetmaster restart':
303 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
306 exec { 'rc.local start':
307 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
314 tidy { '/var/lib/puppet/clientbucket/':
318 matches => [ 'paths', 'contents' ],
322 file { '/root/.bashrc':
323 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
325 file { '/root/.profile':
326 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
328 file { '/root/.screenrc':
329 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
331 file { '/root/.vimrc':
332 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',