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']
118 site::aptrepo { 'backports.debian.org':
119 url => $mirror_backports,
120 suite => "${::lsbdistcodename}-backports",
121 components => ['main','contrib','non-free']
124 site::aptrepo { 'volatile':
126 suite => "${::lsbdistcodename}-updates",
127 components => ['main','contrib','non-free']
130 if $::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, rem] {
131 site::aptrepo { 'proposed-updates':
133 suite => "${::lsbdistcodename}-proposed-updates",
134 components => ['main','contrib','non-free']
138 site::aptrepo { 'debian.org':
142 site::aptrepo { 'db.debian.org':
143 url => 'http://db.debian.org/debian-admin',
145 components => 'main',
146 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
149 augeas { 'inittab_replicate':
150 context => '/files/etc/inittab',
152 'set ud/runlevels 2345',
153 'set ud/action respawn',
154 'set ud/process "/usr/bin/ud-replicated -d"',
156 notify => Exec['init q'],
159 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
160 site::aptrepo { 'debian':
161 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
162 suite => $::lsbdistcodename,
163 components => ['main','contrib','non-free']
167 file { '/etc/facter':
172 source => 'puppet:///files/empty/',
174 file { '/etc/facter/facts.d':
177 file { '/etc/facter/facts.d/debian_facts.yaml':
178 content => template('debian-org/debian_facts.yaml.erb')
180 file { '/etc/apt/preferences':
181 source => 'puppet:///modules/debian-org/apt.preferences',
183 file { '/etc/apt/apt.conf.d/local-compression':
184 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
186 file { '/etc/apt/apt.conf.d/local-recommends':
187 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
189 file { '/etc/apt/apt.conf.d/local-pdiffs':
190 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
192 file { '/etc/timezone':
193 source => 'puppet:///modules/debian-org/timezone',
194 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
196 if $::hostname == handel {
197 include puppetmaster::db
198 $dbpassword = $puppetmaster::db::password
200 file { '/etc/puppet/puppet.conf':
201 content => template('debian-org/puppet.conf.erb'),
203 file { '/etc/default/puppet':
204 source => 'puppet:///modules/debian-org/puppet.default',
206 file { '/etc/cron.d/dsa-puppet-stuff':
207 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
208 require => Package['debian.org'],
210 file { '/etc/ldap/ldap.conf':
211 require => Package['debian.org'],
212 source => 'puppet:///modules/debian-org/ldap.conf',
214 file { '/etc/pam.d/common-session':
215 require => Package['debian.org'],
216 content => template('debian-org/pam.common-session.erb'),
218 file { '/etc/pam.d/common-session-noninteractive':
219 require => Package['debian.org'],
220 content => template('debian-org/pam.common-session-noninteractive.erb'),
222 file { '/etc/rc.local':
224 source => 'puppet:///modules/debian-org/rc.local',
225 notify => Exec['rc.local start'],
231 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
232 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
233 require => Package['debian.org']
235 file { '/etc/nsswitch.conf':
237 source => 'puppet:///modules/debian-org/nsswitch.conf',
240 # set mmap_min_addr to 4096 to mitigate
241 # Linux NULL-pointer dereference exploits
242 site::sysctl { 'mmap_min_addr':
245 site::sysctl { 'perf_event_paranoid':
246 key => 'kernel.perf_event_paranoid',
249 site::alternative { 'editor':
250 linkto => '/usr/bin/vim.basic',
252 site::alternative { 'view':
253 linkto => '/usr/bin/vim.basic',
255 mailalias { 'samhain-reports':
257 recipient => $debianadmin,
258 require => Package['debian.org']
261 file { '/usr/local/bin/check_for_updates':
262 source => 'puppet:///modules/debian-org/check_for_updates',
268 exec { 'apt-get update':
269 path => '/usr/bin:/usr/sbin:/bin:/sbin',
270 onlyif => '/usr/local/bin/check_for_updates',
271 require => File['/usr/local/bin/check_for_updates']
273 Exec['apt-get update']->Package<| tag == extra_repo |>
275 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
276 path => '/usr/bin:/usr/sbin:/bin:/sbin',
279 exec { 'puppetmaster restart':
280 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
283 exec { 'rc.local start':
284 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
291 tidy { '/var/lib/puppet/clientbucket/':
295 matches => [ 'paths', 'contents' ],