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':
106 file { '/etc/apt/trusted.gpg':
111 site::aptrepo { 'security':
112 url => 'http://security.debian.org/',
113 suite => "${::lsbdistcodename}/updates",
114 components => ['main','contrib','non-free']
117 site::aptrepo { 'backports.debian.org':
118 url => $mirror_backports,
119 suite => "${::lsbdistcodename}-backports",
120 components => ['main','contrib','non-free']
123 site::aptrepo { 'volatile':
125 suite => "${::lsbdistcodename}-updates",
126 components => ['main','contrib','non-free']
129 if $::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, rem] {
130 site::aptrepo { 'proposed-updates':
132 suite => "${::lsbdistcodename}-proposed-updates",
133 components => ['main','contrib','non-free']
137 site::aptrepo { 'debian.org':
141 site::aptrepo { 'db.debian.org':
142 url => 'http://db.debian.org/debian-admin',
144 components => 'main',
145 key => 'puppet:///modules/debian-org/db.debian.org.asc',
148 augeas { 'inittab_replicate':
149 context => '/files/etc/inittab',
151 'set ud/runlevels 2345',
152 'set ud/action respawn',
153 'set ud/process "/usr/bin/ud-replicated -d"',
155 notify => Exec['init q'],
158 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
159 site::aptrepo { 'debian':
160 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
161 suite => $::lsbdistcodename,
162 components => ['main','contrib','non-free']
166 file { '/etc/facter':
171 source => 'puppet:///files/empty/',
173 file { '/etc/facter/facts.d':
176 file { '/etc/facter/facts.d/debian_facts.yaml':
177 content => template('debian-org/debian_facts.yaml.erb')
179 file { '/etc/apt/preferences':
180 source => 'puppet:///modules/debian-org/apt.preferences',
182 file { '/etc/apt/apt.conf.d/local-compression':
183 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
185 file { '/etc/apt/apt.conf.d/local-recommends':
186 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
188 file { '/etc/apt/apt.conf.d/local-pdiffs':
189 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
191 file { '/etc/timezone':
192 source => 'puppet:///modules/debian-org/timezone',
193 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
195 if $::hostname == handel {
196 include puppetmaster::db
197 $dbpassword = $puppetmaster::db::password
199 file { '/etc/puppet/puppet.conf':
200 content => template('debian-org/puppet.conf.erb'),
202 file { '/etc/default/puppet':
203 source => 'puppet:///modules/debian-org/puppet.default',
205 file { '/etc/cron.d/dsa-puppet-stuff':
206 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
207 require => Package['debian.org'],
209 file { '/etc/ldap/ldap.conf':
210 require => Package['debian.org'],
211 source => 'puppet:///modules/debian-org/ldap.conf',
213 file { '/etc/pam.d/common-session':
214 require => Package['debian.org'],
215 content => template('debian-org/pam.common-session.erb'),
217 file { '/etc/pam.d/common-session-noninteractive':
218 require => Package['debian.org'],
219 content => template('debian-org/pam.common-session-noninteractive.erb'),
221 file { '/etc/rc.local':
223 source => 'puppet:///modules/debian-org/rc.local',
224 notify => Exec['rc.local start'],
230 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
231 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
232 require => Package['debian.org']
234 file { '/etc/nsswitch.conf':
236 source => 'puppet:///modules/debian-org/nsswitch.conf',
239 # set mmap_min_addr to 4096 to mitigate
240 # Linux NULL-pointer dereference exploits
241 site::sysctl { 'mmap_min_addr':
244 site::sysctl { 'perf_event_paranoid':
245 key => 'kernel.perf_event_paranoid',
248 site::alternative { 'editor':
249 linkto => '/usr/bin/vim.basic',
251 site::alternative { 'view':
252 linkto => '/usr/bin/vim.basic',
254 mailalias { 'samhain-reports':
256 recipient => $debianadmin,
257 require => Package['debian.org']
260 file { '/usr/local/bin/check_for_updates':
261 source => 'puppet:///modules/debian-org/check_for_updates',
267 exec { 'apt-get update':
268 path => '/usr/bin:/usr/sbin:/bin:/sbin',
269 onlyif => '/usr/local/bin/check_for_updates',
270 require => File['/usr/local/bin/check_for_updates']
272 Exec['apt-get update']->Package<| tag == extra_repo |>
274 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
275 path => '/usr/bin:/usr/sbin:/bin:/sbin',
278 exec { 'puppetmaster restart':
279 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
282 exec { 'rc.local start':
283 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
290 tidy { '/var/lib/puppet/clientbucket/':
294 matches => [ 'paths', 'contents' ],