Try to avoid reserved site keyword
[mirror/dsa-puppet.git] / modules / samhain / templates / samhainrc.erb
index 812a435..a0b1e0a 100644 (file)
@@ -68,6 +68,7 @@
 # RedefUser0=(no default)
 # RedefUser1=(no default)
 IgnoreMissing=/etc/lvm/archive/.*.vg
+IgnoreMissing=/var/lib/puppet/clientbucket/.*
 
 [Attributes]
 ##
@@ -110,7 +111,16 @@ file=/etc/static-clients.conf
 <% elsif classes.include?("roles::static_source") -%>
 file=/etc/static-clients.conf
 <% end -%>
+<% if classes.include?("apache2") -%>
+file=/etc/apache2/conf-available/puppet-ssl-key-pins.conf
+<% end -%>
 file=/etc/multipath/wwids
+<%- if has_variable?("bgpd") && @bgpd -%>
+file=/etc/quagga/bgpd.conf
+<% end -%>
+<%- if has_variable?("zebra") && @zebra -%>
+file=/etc/quagga/zebra.conf
+<% end -%>
 
 #
 # There are files in /etc that might change, thus changing the directory
@@ -126,9 +136,11 @@ file=/etc/init.d/.depend.start
 file=/etc/init.d/.depend.stop
 
 # These are the directories for the files we handle with puppet
-file=/etc/apache2/conf.d
+<% if classes.include?("apache2") -%>
+file=/etc/apache2/conf-available
 files=/etc/apache2/mods-enabled
 files=/etc/apache2/sites-available
+<% end -%>
 file=/etc/bacula
 file=/etc/samhain
 file=/etc/munin
@@ -137,6 +149,7 @@ file=/etc/munin/plugin-conf.d
 file=/etc/munin/munin-conf.d
 file=/etc/exim4
 file=/etc/exim4/ssl
+file=/etc/exim4/conf.d
 file=/etc/apt
 file=/etc/apt/apt.conf.d
 file=/etc/apt/sources.list.d
@@ -159,6 +172,8 @@ file=/etc/monit
 file=/etc/monit/monit.d
 file=/etc/pam.d
 file=/etc/schroot/default
+file=/etc/schroot/dsa
+file=/etc/schroot/dsa/default-mirror
 file=/etc/schroot/setup.d
 file=/etc/sysctl.d
 file=/etc/syslog-ng
@@ -170,11 +185,23 @@ file=/etc/rc.local
 file=/etc/unbound
 file=/etc/dsa
 file=/etc/rabbitmq
-<% if scope.function_has_role(['static_mirror']) or scope.function_has_role(['static_source']) or scope.function_has_role(['static_master']) -%>
+<% if scope.function_has_role(['static_mirror']) or scope.function_has_role(['static_source']) or classes.include?("roles::static_master")  -%>
 file=/etc/ssh/userkeys
 file=/etc/ssh/userkeys/staticsync
 <% end -%>
+<% if scope.function_has_role(['ssh.upload.d.o']) -%>
+file=/etc/ssh/userkeys/buildd-uploader
+<% end -%>
+<% if classes.include?('roles::buildd_master') -%>
+file=/etc/ssh/userkeys/wb-buildd.more
+<% end -%>
 file=/etc/rsyncd
+<%- if @hostname == "sibelius" then -%>
+file=/etc/tsm
+file=/etc/tsm/TSM.PWD
+<% end -%>
+file=/etc/ssl/private
+
 
 [LogFiles]
 ##
@@ -232,15 +259,17 @@ file=/var/log/syslog
 
 
 [IgnoreAll]
+dir=-1/srv
 ##
 ## for these files, no modifications are reported
 ##
 ## This file might be created or removed by the system sometimes.
 ##
 file=/etc/resolv.conf
-<% if scope.lookupvar('site::nodeinfo')['buildd'] -%>
+<% if classes.include?('roles::buildd') -%>
 file=/etc/dupload.conf
 file=/etc/buildd/buildd.conf
+file=/etc/sbuild/sbuild.conf
 <% end -%>
 file=/etc/resolv.conf.pcmcia.save
 file=/etc/nologin
@@ -304,7 +333,7 @@ dir=/etc/bacula/storage-conf.d
 dir=/etc/bacula/conf.d
 <%=
 out=""
-if scope.lookupvar('site::nodeinfo')['heavy_exim']
+if scope.lookupvar('deprecated::nodeinfo')['heavy_exim']
   out = '
 file=/etc/exim4/surbl_whitelist.txt
 file=/etc/exim4/exim_surbl.pl
@@ -360,15 +389,11 @@ file=/etc/apache2/sites-available/www.debian.org
 file=/etc/apt/preferences
 file=/etc/apt/sources.list.d/volatile.list
 file=/etc/apt/sources.list.d/security.list
-file=/etc/apt/sources.list.d/buildd.list
-file=/etc/apt/sources.list.d/buildd.debian.org.list
-file=/etc/apt/sources.list.d/buildd.debian.org-proposed.list
-file=/etc/apt/sources.list.d/buildd.debian.org-experimental.list
 file=/etc/apt/sources.list.d/geoip.list
 file=/etc/apt/sources.list.d/backports.debian.org.list
 file=/etc/apt/sources.list.d/debian.org.list
 file=/etc/apt/sources.list.d/db.debian.org.list
-file=/etc/apt/sources.list.d/debian.restricted.list
+file=/etc/apt/sources.list.d/db.debian.org.restricted.list
 file=/etc/apt/sources.list.d/debian.list
 file=/etc/apt/sources.list.d/backports.org.list
 file=/etc/apt/apt.conf.d/local-compression
@@ -376,7 +401,6 @@ file=/etc/apt/apt.conf.d/local-recommends
 file=/etc/apt/apt.conf.d/local-pdiffs
 file=/etc/apt/apt.conf.d/local-ssl-ca-global
 file=/etc/apt/preferences.d/buildd
-file=/etc/systemd/system/puppet.service
 file=/etc/puppet/puppet.conf
 file=/etc/default/puppet
 file=/etc/default/postgrey
@@ -413,16 +437,15 @@ file=/usr/lib/nagios/plugins/dsa-update-samhain-status
 file=/etc/sudoers
 file=/etc/stunnel/puppet-ekeyd-peer.pem
 file=/etc/stunnel/puppet-ekeyd.conf
-file=/etc/sysctl.d/mmap_min_addr.conf
 file=/etc/pam.d/sudo
 file=/etc/monit/monitrc
 file=/etc/monit/monit.d/01puppet
 file=/etc/monit/monit.d/00debian.org
 file=/etc/cron.d/dsa-puppet-stuff
-file=/etc/cron.d/dsa-buildd
 file=/etc/cron.weekly/stunnel-ekey-restart
 file=/etc/default/schroot
 file=/etc/schroot/default/nssdatabases
+file=/etc/schroot/setup.d/99builddsourceslist
 file=/etc/schroot/setup.d/99porterbox-extra-sources
 file=/etc/schroot/setup.d/99porterbox-extra-apt-options
 file=/etc/openvswitch/conf.db
@@ -440,7 +463,7 @@ file=/etc/nagios3/puppetconf.d/contacts.cfg
 <% if scope.function_has_role(['muninmaster']) -%>
 file=/etc/munin/munin.conf
 <% end -%>
-<% if scope.function_has_role(['puppetmaster']) -%>
+<% if classes.include?('roles::puppetmaster') -%>
 dir=8/etc/puppet
 <% end -%>  
 <% if classes.include?('named::geodns') -%>
@@ -474,7 +497,7 @@ file=/etc/openvpn/deb-mgmt-clients.pool
 file=/etc/rsyncd/debian.secrets
 
 
-<% if scope.function_has_role(['puppetmaster']) %>
+<% if classes.include?('roles::puppetmaster') -%>
 
 # Damn you rails apps and your shoddy packaging
 file=/usr/share/puppet-dashboard/public/stylesheets
@@ -484,9 +507,8 @@ file=/usr/share/puppet-dashboard/public/javascripts/all.js
 dir=1/usr/share/puppet-dashboard/tmp/pids
 <% end -%>
 
-<% if classes.include?("porterbox") %>
-file=/etc/cron.weekly/puppet-mail-big-homedirs
-<% end -%>
+file=/etc/ssl/private/*.key-certchain
+dir=10/var/lib/puppet/clientbucket
 
 [IgnoreNone]
 ##
@@ -506,15 +528,24 @@ file=/etc/cron.weekly/puppet-mail-big-homedirs
 ## for these files, only access time is ignored
 ##
 dir=/usr/bin
+<%- if has_variable?("merged_usr") && @merged_usr -%>
+file=/bin
+<% else -%>
 dir=/bin
+<% end -%>
 dir=/boot
 #
 # SuSE (old) has the boot init scripts in /sbin/init.d/*, 
 # so we go 3 levels deep
 #
+<%- if has_variable?("merged_usr") && @merged_usr -%>
+file=/lib
+file=/sbin
+<% else -%>
 dir=3/sbin
-dir=/usr/sbin
 dir=/lib
+<% end -%>
+dir=/usr/sbin
 dir=3/usr/lib
 dir=3/usr/share
 #
@@ -652,14 +683,14 @@ SyslogSeverity=alert
 #
 #####################################################
 
-[SuidCheck]
+[SuidCheck]
 ##
 ## --- Check the filesystem for SUID/SGID binaries
 ## 
 
-## Switch on
+## Switch off
 #
-# SuidCheckActive = yes
+SuidCheckActive = 0
 
 ## Interval for check (seconds)
 #
@@ -824,6 +855,11 @@ SyslogSeverity=alert
 #
 # SetDefault = no
 
+<% if scope.call_function('versioncmp', [@lsbmajdistrelease, '9']) >= 0 -%>
+[PortCheck]
+PortCheckActive=0
+<% end -%>
+
 
 #####################################################
 #
@@ -929,7 +965,7 @@ SetMailNum = 10
 
 ## Recipient (max. 8)
 #
-SetMailAddress=samhain-reports@<%= fqdn -%>
+SetMailAddress=samhain-reports@<%= @fqdn -%>
 
 SetMailRelay = localhost