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']
125 site::aptrepo { 'backports.debian.org':
126 url => $mirror_backports,
127 suite => "${::lsbdistcodename}-backports",
128 components => ['main','contrib','non-free']
131 site::aptrepo { 'volatile':
133 suite => "${::lsbdistcodename}-updates",
134 components => ['main','contrib','non-free']
137 if $::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, rem] {
138 site::aptrepo { 'proposed-updates':
140 suite => "${::lsbdistcodename}-proposed-updates",
141 components => ['main','contrib','non-free']
145 site::aptrepo { 'debian.org':
149 site::aptrepo { 'db.debian.org':
150 url => 'http://db.debian.org/debian-admin',
152 components => 'main',
153 key => 'puppet:///modules/debian-org/db.debian.org.gpg',
156 augeas { 'inittab_replicate':
157 context => '/files/etc/inittab',
159 'set ud/runlevels 2345',
160 'set ud/action respawn',
161 'set ud/process "/usr/bin/ud-replicated -d"',
163 notify => Exec['init q'],
166 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
167 site::aptrepo { 'debian':
168 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
169 suite => $::lsbdistcodename,
170 components => ['main','contrib','non-free']
174 file { '/etc/facter':
179 source => 'puppet:///files/empty/',
181 file { '/etc/facter/facts.d':
184 file { '/etc/facter/facts.d/debian_facts.yaml':
185 content => template('debian-org/debian_facts.yaml.erb')
187 file { '/etc/apt/preferences':
188 source => 'puppet:///modules/debian-org/apt.preferences',
190 file { '/etc/apt/apt.conf.d/local-compression':
191 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
193 file { '/etc/apt/apt.conf.d/local-recommends':
194 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
196 file { '/etc/apt/apt.conf.d/local-pdiffs':
197 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
199 file { '/etc/timezone':
200 source => 'puppet:///modules/debian-org/timezone',
201 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
203 if $::hostname == handel {
204 include puppetmaster::db
205 $dbpassword = $puppetmaster::db::password
207 file { '/etc/puppet/puppet.conf':
208 content => template('debian-org/puppet.conf.erb'),
210 file { '/etc/default/puppet':
211 source => 'puppet:///modules/debian-org/puppet.default',
213 file { '/etc/cron.d/dsa-puppet-stuff':
214 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
215 require => Package['debian.org'],
217 file { '/etc/ldap/ldap.conf':
218 require => Package['debian.org'],
219 source => 'puppet:///modules/debian-org/ldap.conf',
221 file { '/etc/pam.d/common-session':
222 require => Package['debian.org'],
223 content => template('debian-org/pam.common-session.erb'),
225 file { '/etc/pam.d/common-session-noninteractive':
226 require => Package['debian.org'],
227 content => template('debian-org/pam.common-session-noninteractive.erb'),
229 file { '/etc/rc.local':
231 source => 'puppet:///modules/debian-org/rc.local',
232 notify => Exec['rc.local start'],
238 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
239 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
240 require => Package['debian.org']
242 file { '/etc/nsswitch.conf':
244 source => 'puppet:///modules/debian-org/nsswitch.conf',
247 # set mmap_min_addr to 4096 to mitigate
248 # Linux NULL-pointer dereference exploits
249 site::sysctl { 'mmap_min_addr':
252 site::sysctl { 'perf_event_paranoid':
253 key => 'kernel.perf_event_paranoid',
256 site::alternative { 'editor':
257 linkto => '/usr/bin/vim.basic',
259 site::alternative { 'view':
260 linkto => '/usr/bin/vim.basic',
262 mailalias { 'samhain-reports':
264 recipient => $debianadmin,
265 require => Package['debian.org']
268 file { '/usr/local/bin/check_for_updates':
269 source => 'puppet:///modules/debian-org/check_for_updates',
275 exec { 'apt-get update':
276 path => '/usr/bin:/usr/sbin:/bin:/sbin',
277 onlyif => '/usr/local/bin/check_for_updates',
278 require => File['/usr/local/bin/check_for_updates']
280 Exec['apt-get update']->Package<| tag == extra_repo |>
282 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
283 path => '/usr/bin:/usr/sbin:/bin:/sbin',
286 exec { 'puppetmaster restart':
287 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
290 exec { 'rc.local start':
291 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
298 tidy { '/var/lib/puppet/clientbucket/':
302 matches => [ 'paths', 'contents' ],