nagiosmaster -> hiera role; bind acls still not converted
[mirror/dsa-puppet.git] / modules / samhain / templates / samhainrc.erb
index 09903f6..0bbd965 100644 (file)
@@ -68,6 +68,7 @@
 # RedefUser0=(no default)
 # RedefUser1=(no default)
 IgnoreMissing=/etc/lvm/archive/.*.vg
+IgnoreMissing=/var/lib/puppet/clientbucket/.*
 
 [Attributes]
 ##
@@ -102,13 +103,20 @@ file=/etc/bind/geodns/recvconf.files
 file=/etc/bind/named.conf.options
 <% end -%>
 file=/etc/apache2/conf.d/puppet-builddlist
-<% if classes.include?("roles::static_mirror") -%>
+<% if classes.include?("roles::static_mirror_web") -%>
 file=/etc/apache2/sites-available/static-vhosts-simple
+<% elsif classes.include?("staticsync::static_master") -%>
 file=/etc/static-clients.conf
-<% elsif classes.include?("roles::static_master") -%>
-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 -%>
 
 #
@@ -125,9 +133,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
@@ -136,6 +146,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
@@ -146,7 +157,7 @@ file=/etc/nagios
 file=/etc/nagios/nrpe.d
 file=/etc/nagios/obsolete-packages-ignore.d
 file=/etc/bind/geodns
-<% if scope.function_has_role(['nagiosmaster']) -%>
+<% if classes.include?("nagios::server") -%>
 file=/etc/nagios3/puppetconf.d
 <% end -%>
 file=/etc/puppet
@@ -158,6 +169,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
@@ -169,10 +182,16 @@ 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']) -%>
-file=/etc/ssh/userkeys
-file=/etc/ssh/userkeys/staticsync
+<% 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]
 ##
@@ -230,14 +249,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
@@ -246,7 +268,6 @@ file=/etc/postfix/debian
 file=/etc/ssh/ssh_known_hosts
 file=/etc/ssh/ssh-rsa-shadow
 file=/var/lib/misc/ssh-rsa-shadow
-file=/etc/.da-backup.trace
 file=/etc/postfix/debianhosts
 file=/etc/postfix/debianhosts.db
 file=/etc/blkid.tab
@@ -289,7 +310,7 @@ file=/etc/exim4/ssl/thishost.key
 dir=3/etc/exim4/email-virtualdomains
 file=/etc/ssh/ssh_config
 file=/etc/ssh/sshd_config
-file=/etc/dsa/cron.ignore.dsa-puppet-stuff
+file=/etc/dsa/cron.ignore.puppet-crontab
 file=/etc/vsftpd.conf
 file=/etc/aliases
 file=/etc/multipath.conf
@@ -299,19 +320,6 @@ file=/etc/rabbitmq/enabled_plugins
 dir=/etc/bacula/storages-list.d
 dir=/etc/bacula/storage-conf.d
 dir=/etc/bacula/conf.d
-<%=
-out=""
-if scope.lookupvar('site::nodeinfo')['heavy_exim']
-  out = '
-file=/etc/exim4/surbl_whitelist.txt
-file=/etc/exim4/exim_surbl.pl
-file=/etc/exim4/ccTLD.txt
-file=/etc/clamav-unofficial-sigs.conf
-file=/etc/clamav-unofficial-sigs.dsa.conf
-'
-end
-out
-%>
 file=/etc/munin/plugins/bind
 file=/etc/munin/plugins/bind_views
 file=/etc/munin/plugins/cpu
@@ -357,15 +365,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
@@ -373,7 +377,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
@@ -410,21 +413,20 @@ 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.d/puppet-crontab
 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
 
-<% if scope.function_has_role(['nagiosmaster']) -%>
+<% if classes.include?("nagios::server") -%>
 file=/etc/nagios3/puppetconf.d/auto-hostgroups.cfg
 file=/etc/nagios3/puppetconf.d/auto-hosts.cfg
 file=/etc/nagios3/puppetconf.d/auto-services.cfg
@@ -434,10 +436,10 @@ file=/etc/nagios3/puppetconf.d/auto-serviceextinfo.cfg
 file=/etc/nagios3/puppetconf.d/auto-servicegroups.cfg
 file=/etc/nagios3/puppetconf.d/contacts.cfg
 <% end -%>
-<% if scope.function_has_role(['muninmaster']) -%>
+<% if classes.include?('roles::munin_master') -%>
 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') -%>
@@ -455,6 +457,7 @@ dir=3/etc/facter
 file=/etc/ferm/conf.d/me.conf
 file=/etc/ferm/conf.d/defs.conf
 file=/etc/ferm/ferm.conf
+file=/etc/ssl/README
 dir=2/etc/ssl/debian
 dir=1/etc/ssl/certs
 dir=1/etc/ssl/ca-debian
@@ -467,9 +470,10 @@ file=/etc/unbound/unbound.conf
 <% if scope.lookupvar('::fqdn') == "draghi.debian.org" -%>
 file=/etc/openvpn/deb-mgmt-clients.pool
 <% end -%>
+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
@@ -479,9 +483,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]
 ##
@@ -501,15 +504,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
 #
@@ -647,14 +659,14 @@ SyslogSeverity=alert
 #
 #####################################################
 
-[SuidCheck]
+[SuidCheck]
 ##
 ## --- Check the filesystem for SUID/SGID binaries
 ## 
 
-## Switch on
+## Switch off
 #
-# SuidCheckActive = yes
+SuidCheckActive = 0
 
 ## Interval for check (seconds)
 #
@@ -819,6 +831,11 @@ SyslogSeverity=alert
 #
 # SetDefault = no
 
+<% if scope.call_function('versioncmp', [@lsbmajdistrelease, '9']) >= 0 -%>
+[PortCheck]
+PortCheckActive=0
+<% end -%>
+
 
 #####################################################
 #
@@ -924,7 +941,7 @@ SetMailNum = 10
 
 ## Recipient (max. 8)
 #
-SetMailAddress=samhain-reports@<%= fqdn -%>
+SetMailAddress=samhain-reports@<%= @fqdn -%>
 
 SetMailRelay = localhost