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',
47 'libfilesystem-ruby1.8',
55 if $::lsbmajdistrelease >= 7 {
56 package { 'libfilesystem-ruby1.9.1':
81 if getfromhash($site::nodeinfo, 'broken-rtc') {
82 package { 'fake-hwclock':
88 package { 'molly-guard':
91 file { '/etc/molly-guard/run.d/10-check-kvm':
93 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
94 require => Package['molly-guard'],
96 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
98 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
99 require => Package['molly-guard'],
102 file { '/etc/apt/trusted-keys.d':
107 file { '/etc/apt/trusted.gpg':
112 site::aptrepo { 'security':
113 url => 'http://security.debian.org/',
114 suite => "${::lsbdistcodename}/updates",
115 components => ['main','contrib','non-free']
117 if $::lsbmajdistrelease < 7 {
118 site::aptrepo { 'debian-lts':
120 suite => "${::lsbdistcodename}-lts",
121 components => ['main','contrib','non-free']
124 site::aptrepo { 'debian-lts':
129 site::aptrepo { 'backports.debian.org':
130 url => $mirror_backports,
131 suite => "${::lsbdistcodename}-backports",
132 components => ['main','contrib','non-free']
135 site::aptrepo { 'volatile':
137 suite => "${::lsbdistcodename}-updates",
138 components => ['main','contrib','non-free']
141 if $::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, rem] {
142 site::aptrepo { 'proposed-updates':
144 suite => "${::lsbdistcodename}-proposed-updates",
145 components => ['main','contrib','non-free']
149 site::aptrepo { 'debian.org':
153 site::aptrepo { 'db.debian.org':
154 url => 'http://db.debian.org/debian-admin',
156 components => 'main',
157 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
160 augeas { 'inittab_replicate':
161 context => '/files/etc/inittab',
163 'set ud/runlevels 2345',
164 'set ud/action respawn',
165 'set ud/process "/usr/bin/ud-replicated -d"',
167 notify => Exec['init q'],
170 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
171 site::aptrepo { 'debian':
172 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
173 suite => $::lsbdistcodename,
174 components => ['main','contrib','non-free']
178 file { '/etc/facter':
183 source => 'puppet:///files/empty/',
185 file { '/etc/facter/facts.d':
188 file { '/etc/facter/facts.d/debian_facts.yaml':
189 content => template('debian-org/debian_facts.yaml.erb')
191 file { '/etc/apt/preferences':
192 source => 'puppet:///modules/debian-org/apt.preferences',
194 file { '/etc/apt/apt.conf.d/local-compression':
195 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
197 file { '/etc/apt/apt.conf.d/local-recommends':
198 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
200 file { '/etc/apt/apt.conf.d/local-pdiffs':
201 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
203 file { '/etc/timezone':
204 source => 'puppet:///modules/debian-org/timezone',
205 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
207 if $::hostname == handel {
208 include puppetmaster::db
209 $dbpassword = $puppetmaster::db::password
211 file { '/etc/puppet/puppet.conf':
212 content => template('debian-org/puppet.conf.erb'),
214 file { '/etc/default/puppet':
215 source => 'puppet:///modules/debian-org/puppet.default',
217 file { '/etc/cron.d/dsa-puppet-stuff':
218 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
219 require => Package['debian.org'],
221 file { '/etc/ldap/ldap.conf':
222 require => Package['debian.org'],
223 source => 'puppet:///modules/debian-org/ldap.conf',
225 file { '/etc/pam.d/common-session':
226 require => Package['debian.org'],
227 content => template('debian-org/pam.common-session.erb'),
229 file { '/etc/pam.d/common-session-noninteractive':
230 require => Package['debian.org'],
231 content => template('debian-org/pam.common-session-noninteractive.erb'),
233 file { '/etc/rc.local':
235 source => 'puppet:///modules/debian-org/rc.local',
236 notify => Exec['rc.local start'],
242 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
243 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
244 require => Package['debian.org']
246 file { '/etc/nsswitch.conf':
248 source => 'puppet:///modules/debian-org/nsswitch.conf',
251 # set mmap_min_addr to 4096 to mitigate
252 # Linux NULL-pointer dereference exploits
253 site::sysctl { 'mmap_min_addr':
256 site::sysctl { 'perf_event_paranoid':
257 key => 'kernel.perf_event_paranoid',
260 site::alternative { 'editor':
261 linkto => '/usr/bin/vim.basic',
263 site::alternative { 'view':
264 linkto => '/usr/bin/vim.basic',
266 mailalias { 'samhain-reports':
268 recipient => $debianadmin,
269 require => Package['debian.org']
272 file { '/usr/local/bin/check_for_updates':
273 source => 'puppet:///modules/debian-org/check_for_updates',
279 exec { 'apt-get update':
280 path => '/usr/bin:/usr/sbin:/bin:/sbin',
281 onlyif => '/usr/local/bin/check_for_updates',
282 require => File['/usr/local/bin/check_for_updates']
284 Exec['apt-get update']->Package<| tag == extra_repo |>
286 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
287 path => '/usr/bin:/usr/sbin:/bin:/sbin',
290 exec { 'puppetmaster restart':
291 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
294 exec { 'rc.local start':
295 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
302 tidy { '/var/lib/puppet/clientbucket/':
306 matches => [ 'paths', 'contents' ],
310 file { '/root/.bashrc':
311 source => 'puppet:///modules/debian-org/root-dotfiles/bashrc',
313 file { '/root/.profile':
314 source => 'puppet:///modules/debian-org/root-dotfiles/profile',
316 file { '/root/.screenrc':
317 source => 'puppet:///modules/debian-org/root-dotfiles/screenrc',
319 file { '/root/.vimrc':
320 source => 'puppet:///modules/debian-org/root-dotfiles/vimrc',