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',
42 'libfilesystem-ruby1.8',
50 if $::lsbmajdistrelease >= 7 {
51 package { 'libfilesystem-ruby1.9.1':
76 if getfromhash($site::nodeinfo, 'broken-rtc') {
77 package { 'fake-hwclock':
83 package { 'molly-guard':
86 file { '/etc/molly-guard/run.d/10-check-kvm':
88 source => 'puppet:///modules/debian-org/molly-guard/10-check-kvm',
89 require => Package['molly-guard'],
91 file { '/etc/molly-guard/run.d/15-acquire-reboot-lock':
93 source => 'puppet:///modules/debian-org/molly-guard/15-acquire-reboot-lock',
94 require => Package['molly-guard'],
97 site::aptrepo { 'security':
98 url => 'http://security.debian.org/',
99 suite => "${::lsbdistcodename}/updates",
100 components => ['main','contrib','non-free']
103 site::aptrepo { 'backports.debian.org':
104 url => $mirror_backports,
105 suite => "${::lsbdistcodename}-backports",
106 components => ['main','contrib','non-free']
108 site::aptrepo { 'backports.org':
111 key => 'puppet:///modules/debian-org/backports.org.asc',
114 site::aptrepo { 'volatile':
116 suite => "${::lsbdistcodename}-updates",
117 components => ['main','contrib','non-free']
120 site::aptrepo { 'debian.org':
124 site::aptrepo { 'db.debian.org':
125 url => 'http://db.debian.org/debian-admin',
127 components => 'main',
128 key => 'puppet:///modules/debian-org/db.debian.org.asc',
131 if getfromhash($site::nodeinfo, 'hoster', 'mirror-debian') {
132 site::aptrepo { 'debian':
133 url => getfromhash($site::nodeinfo, 'hoster', 'mirror-debian'),
134 suite => $::lsbdistcodename,
135 components => ['main','contrib','non-free']
139 file { '/etc/facter':
144 source => 'puppet:///files/empty/',
146 file { '/etc/facter/facts.d':
149 file { '/etc/facter/facts.d/debian_facts.yaml':
150 content => template('debian-org/debian_facts.yaml.erb')
152 file { '/etc/apt/preferences':
153 source => 'puppet:///modules/debian-org/apt.preferences',
155 file { '/etc/apt/trusted-keys.d/':
159 file { '/etc/apt/apt.conf.d/local-compression':
160 source => 'puppet:///modules/debian-org/apt.conf.d/local-compression',
162 file { '/etc/apt/apt.conf.d/local-recommends':
163 source => 'puppet:///modules/debian-org/apt.conf.d/local-recommends',
165 file { '/etc/apt/apt.conf.d/local-pdiffs':
166 source => 'puppet:///modules/debian-org/apt.conf.d/local-pdiffs',
168 file { '/etc/timezone':
169 source => 'puppet:///modules/debian-org/timezone',
170 notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
172 if $::hostname == handel {
173 include puppetmaster::db
174 $dbpassword = $puppetmaster::db::password
176 file { '/etc/puppet/puppet.conf':
177 content => template('debian-org/puppet.conf.erb'),
179 file { '/etc/default/puppet':
180 source => 'puppet:///modules/debian-org/puppet.default',
182 file { '/etc/cron.d/dsa-puppet-stuff':
183 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron',
184 require => Package['debian.org'],
186 file { '/etc/ldap/ldap.conf':
187 require => Package['debian.org'],
188 source => 'puppet:///modules/debian-org/ldap.conf',
190 file { '/etc/pam.d/common-session':
191 require => Package['debian.org'],
192 content => template('debian-org/pam.common-session.erb'),
194 file { '/etc/pam.d/common-session-noninteractive':
195 require => Package['debian.org'],
196 content => template('debian-org/pam.common-session-noninteractive.erb'),
198 file { '/etc/rc.local':
200 source => 'puppet:///modules/debian-org/rc.local',
201 notify => Exec['rc.local start'],
207 file { '/etc/dsa/cron.ignore.dsa-puppet-stuff':
208 source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron.ignore',
209 require => Package['debian.org']
211 file { '/etc/nsswitch.conf':
213 source => 'puppet:///modules/debian-org/nsswitch.conf',
216 # set mmap_min_addr to 4096 to mitigate
217 # Linux NULL-pointer dereference exploits
218 site::sysctl { 'mmap_min_addr':
221 site::sysctl { 'perf_event_paranoid':
222 key => 'kernel.perf_event_paranoid',
225 site::alternative { 'editor':
226 linkto => '/usr/bin/vim.basic',
228 site::alternative { 'view':
229 linkto => '/usr/bin/vim.basic',
231 mailalias { 'samhain-reports':
233 recipient => $debianadmin,
234 require => Package['debian.org']
237 exec { 'apt-get update':
238 path => '/usr/bin:/usr/sbin:/bin:/sbin',
241 Exec['apt-get update']->Package<| tag == extra_repo |>
243 exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
244 path => '/usr/bin:/usr/sbin:/bin:/sbin',
247 exec { 'puppetmaster restart':
248 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
251 exec { 'rc.local start':
252 path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',