2 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
3 $mirror = getfromhash($site::nodeinfo, 'hoster', 'mirror-debian')
5 $mirror = 'http://http.debian.net/debian/'
7 if $::lsbmajdistrelease < 7 {
8 $mirror_backports = 'http://backports.debian.org/debian-backports/'
10 $mirror_backports = $mirror
14 'debian-archive-debian-samhain-reports@master.debian.org',
15 'debian-admin@ftbfs.de',
18 'paravoid@debian.org',
43 'libfilesystem-ruby1.8',
51 if $::lsbmajdistrelease >= 7 {
52 package { 'libfilesystem-ruby1.9.1':
77 if getfromhash($site::nodeinfo, 'broken-rtc') {
78 package { 'fake-hwclock':
84 package { 'molly-guard':
87 file { '/etc/molly-guard/run.d/10-check-kvm':
89 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
90 require => Package['molly-guard'],
92 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
94 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
95 require => Package['molly-guard'],
98 site::aptrepo { 'security':
99 url => 'http://security.debian.org/',
100 suite => "${::lsbdistcodename}/updates",
101 components => ['main','contrib','non-free']
104 site::aptrepo { 'backports.debian.org':
105 url => $mirror_backports,
106 suite => "${::lsbdistcodename}-backports",
107 components => ['main','contrib','non-free']
109 site::aptrepo { 'backports.org':
112 key => 'puppet:///modules/debian-org/backports.org.asc',
115 site::aptrepo { 'volatile':
117 suite => "${::lsbdistcodename}-updates",
118 components => ['main','contrib','non-free']
121 if $::hostname in [ball, corelli, eysler, lucatelli, mayer, mayr, rem] {
122 site::aptrepo { 'proposed-updates':
124 suite => "${::lsbdistcodename}-proposed-updates",
125 components => ['main','contrib','non-free']
129 site::aptrepo { 'debian.org':
133 site::aptrepo { 'db.debian.org':
134 url => 'http://db.debian.org/debian-admin',
136 components => 'main',
137 key => 'puppet:///modules/debian-org/db.debian.org.asc',
140 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
141 site::aptrepo { 'debian':
142 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
143 suite => $::lsbdistcodename,
144 components => ['main','contrib','non-free']
148 file { '/etc/facter':
153 source => 'puppet:///files/empty/',
155 file { '/etc/facter/facts.d':
158 file { '/etc/facter/facts.d/debian_facts.yaml':
159 content => template('debian-org/debian_facts.yaml.erb')
161 file { '/etc/apt/preferences':
162 source => 'puppet:///modules/debian-org/apt.preferences',
164 file { '/etc/apt/trusted-keys.d/':
168 file { '/etc/apt/apt.conf.d/local-compression':
169 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
171 file { '/etc/apt/apt.conf.d/local-recommends':
172 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
174 file { '/etc/apt/apt.conf.d/local-pdiffs':
175 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
177 file { '/etc/timezone':
178 source => 'puppet:///modules/debian-org/timezone',
179 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
181 if $::hostname == handel {
182 include puppetmaster::db
183 $dbpassword = $puppetmaster::db::password
185 file { '/etc/puppet/puppet.conf':
186 content => template('debian-org/puppet.conf.erb'),
188 file { '/etc/default/puppet':
189 source => 'puppet:///modules/debian-org/puppet.default',
191 file { '/etc/cron.d/dsa-puppet-stuff':
192 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
193 require => Package['debian.org'],
195 file { '/etc/ldap/ldap.conf':
196 require => Package['debian.org'],
197 source => 'puppet:///modules/debian-org/ldap.conf',
199 file { '/etc/pam.d/common-session':
200 require => Package['debian.org'],
201 content => template('debian-org/pam.common-session.erb'),
203 file { '/etc/pam.d/common-session-noninteractive':
204 require => Package['debian.org'],
205 content => template('debian-org/pam.common-session-noninteractive.erb'),
207 file { '/etc/rc.local':
209 source => 'puppet:///modules/debian-org/rc.local',
210 notify => Exec['rc.local start'],
216 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
217 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
218 require => Package['debian.org']
220 file { '/etc/nsswitch.conf':
222 source => 'puppet:///modules/debian-org/nsswitch.conf',
225 # set mmap_min_addr to 4096 to mitigate
226 # Linux NULL-pointer dereference exploits
227 site::sysctl { 'mmap_min_addr':
230 site::sysctl { 'perf_event_paranoid':
231 key => 'kernel.perf_event_paranoid',
234 site::alternative { 'editor':
235 linkto => '/usr/bin/vim.basic',
237 site::alternative { 'view':
238 linkto => '/usr/bin/vim.basic',
240 mailalias { 'samhain-reports':
242 recipient => $debianadmin,
243 require => Package['debian.org']
246 exec { 'apt-get update':
247 path => '/usr/bin:/usr/sbin:/bin:/sbin',
250 Exec['apt-get update']->Package<| tag == extra_repo |>
252 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
253 path => '/usr/bin:/usr/sbin:/bin:/sbin',
256 exec { 'puppetmaster restart':
257 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
260 exec { 'rc.local start':
261 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
268 tidy { '/var/lib/puppet/clientbucket/':
272 matches => [ 'paths', 'contents' ],