class apache2 {
- activate_munin_check {
- "apache_accesses":;
- "apache_processes":;
- "apache_volume":;
- "apache_servers":;
- "ps_apache2": script => "ps_";
- }
-
- package {
- "apache2": ensure => installed;
- "logrotate": ensure => installed;
- }
-
- case $php5 {
- "true": { package {
- "php5-suhosin": ensure => installed;
- }
- file { "/etc/php5/conf.d/suhosin.ini":
- source => [ "puppet:///apache2/per-host/$fqdn/etc/php5/conf.d/suhosin.ini",
- "puppet:///apache2/common/etc/php5/conf.d/suhosin.ini" ],
- require => Package["apache2", "php5-suhosin"],
- notify => Exec["force-reload-apache2"];
- }
- }
- }
+ activate_munin_check {
+ "apache_accesses":;
+ "apache_processes":;
+ "apache_volume":;
+ "apache_servers":;
+ "ps_apache2": script => "ps_";
+ }
+ package {
+ "apache2": ensure => installed;
+ "logrotate": ensure => installed;
+ }
- define activate_apache_site($ensure=present, $site=$name) {
- case $site {
- "": { $base = $name }
- default: { $base = $site }
- }
+ case $php5 {
+ "true": {
+ package {
+ "php5-suhosin": ensure => installed;
+ }
- case $ensure {
- present: {
- file { "/etc/apache2/sites-enabled/$name":
- ensure => "/etc/apache2/sites-available/$base",
- require => Package["apache2"],
- notify => Exec["reload-apache2"];
- }
- }
- absent: {
- file { "/etc/apache2/sites-enabled/$name":
- ensure => $ensure,
- notify => Exec["reload-apache2"];
- }
- }
- default: { err ( "Unknown ensure value: '$ensure'" ) }
- }
+ file { "/etc/php5/conf.d/suhosin.ini":
+ source => [ "puppet:///apache2/per-host/$fqdn/etc/php5/conf.d/suhosin.ini",
+ "puppet:///apache2/common/etc/php5/conf.d/suhosin.ini" ],
+ require => Package["apache2", "php5-suhosin"],
+ notify => Exec["force-reload-apache2"];
+ }
}
+ }
- define enable_module($ensure=present) {
- case $ensure {
- present: {
- exec { "/usr/sbin/a2enmod $name":
- unless => "/bin/sh -c '[ -L /etc/apache2/mods-enabled/${name}.load ]'",
- notify => Exec["force-reload-apache2"],
- }
- }
- absent: {
- exec { "/usr/sbin/a2dismod $name":
- onlyif => "/bin/sh -c '[ -L /etc/apache2/mods-enabled/${name}.load ]'",
- notify => Exec["force-reload-apache2"],
- }
- }
- default: { err ( "Unknown ensure value: '$ensure'" ) }
- }
- }
+ define activate_apache_site($ensure=present, $site=$name) {
+ case $site {
+ "": { $base = $name }
+ default: { $base = $site }
+ }
- enable_module {
- "info":;
- "status":;
+ case $ensure {
+ present: {
+ file { "/etc/apache2/sites-enabled/$name":
+ ensure => "/etc/apache2/sites-available/$base",
+ require => Package["apache2"],
+ notify => Exec["reload-apache2"];
+ }
+ }
+ absent: {
+ file { "/etc/apache2/sites-enabled/$name":
+ ensure => $ensure,
+ notify => Exec["reload-apache2"];
+ }
+ }
+ default: { err ( "Unknown ensure value: '$ensure'" ) }
}
+ }
- activate_apache_site {
- "00-default": site => "default-debian.org";
- "000-default": ensure => absent;
+ define enable_module($ensure=present) {
+ case $ensure {
+ present: {
+ exec {
+ "/usr/sbin/a2enmod $name":
+ unless => "/bin/sh -c '[ -L /etc/apache2/mods-enabled/${name}.load ]'",
+ notify => Exec["force-reload-apache2"],
+ }
+ }
+ absent: {
+ exec {
+ "/usr/sbin/a2dismod $name":
+ onlyif => "/bin/sh -c '[ -L /etc/apache2/mods-enabled/${name}.load ]'",
+ notify => Exec["force-reload-apache2"],
+ }
+ }
+ default: { err ( "Unknown ensure value: '$ensure'" ) }
}
+ }
- file {
- "/etc/apache2/conf.d/ressource-limits":
- content => template("apache2/ressource-limits.erb"),
- require => Package["apache2"],
- notify => Exec["reload-apache2"];
- "/etc/apache2/conf.d/security":
- source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/security",
- "puppet:///apache2/common/etc/apache2/conf.d/security" ],
- require => Package["apache2"],
- notify => Exec["reload-apache2"];
- "/etc/apache2/conf.d/local-serverinfo":
- source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/local-serverinfo",
- "puppet:///apache2/common/etc/apache2/conf.d/local-serverinfo" ],
- require => Package["apache2"],
- notify => Exec["reload-apache2"];
- "/etc/apache2/conf.d/server-status":
- source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/server-status",
- "puppet:///apache2/common/etc/apache2/conf.d/server-status" ],
- require => Package["apache2"],
- notify => Exec["reload-apache2"];
+ enable_module {
+ "info":;
+ "status":;
+ }
+
+ activate_apache_site {
+ "00-default": site => "default-debian.org";
+ "000-default": ensure => absent;
+ }
- "/etc/apache2/sites-available/default-debian.org":
- content => template("apache2/default-debian.org.erb"),
- require => Package["apache2"],
+ file {
+ "/etc/apache2/conf.d/ressource-limits":
+ content => template("apache2/ressource-limits.erb"),
+ require => Package["apache2"],
notify => Exec["reload-apache2"];
+ "/etc/apache2/conf.d/security":
+ source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/security",
+ "puppet:///apache2/common/etc/apache2/conf.d/security" ],
+ require => Package["apache2"],
+ notify => Exec["reload-apache2"];
+ "/etc/apache2/conf.d/local-serverinfo":
+ source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/local-serverinfo",
+ "puppet:///apache2/common/etc/apache2/conf.d/local-serverinfo" ],
+ require => Package["apache2"],
+ notify => Exec["reload-apache2"];
+ "/etc/apache2/conf.d/server-status":
+ source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/conf.d/server-status",
+ "puppet:///apache2/common/etc/apache2/conf.d/server-status" ],
+ require => Package["apache2"],
+ notify => Exec["reload-apache2"];
- "/etc/logrotate.d/apache2":
- source => [ "puppet:///apache2/per-host/$fqdn/etc/logrotate.d/apache2",
- "puppet:///apache2/common/etc/logrotate.d/apache2" ];
+ "/etc/apache2/sites-available/default-debian.org":
+ content => template("apache2/default-debian.org.erb"),
+ require => Package["apache2"],
+ notify => Exec["reload-apache2"];
- "/srv/www":
- mode => 755,
- ensure => directory;
- "/srv/www/default.debian.org":
- mode => 755,
- ensure => directory;
- "/srv/www/default.debian.org/htdocs":
- mode => 755,
- ensure => directory;
- "/srv/www/default.debian.org/htdocs/index.html":
- content => template("apache2/default-index.html");
+ "/etc/logrotate.d/apache2":
+ source => [ "puppet:///apache2/per-host/$fqdn/etc/logrotate.d/apache2",
+ "puppet:///apache2/common/etc/logrotate.d/apache2" ];
- # sometimes this is a symlink
- #"/var/log/apache2":
- # mode => 755,
- # ensure => directory;
- }
+ "/srv/www":
+ mode => 755,
+ ensure => directory;
+ "/srv/www/default.debian.org":
+ mode => 755,
+ ensure => directory;
+ "/srv/www/default.debian.org/htdocs":
+ mode => 755,
+ ensure => directory;
+ "/srv/www/default.debian.org/htdocs/index.html":
+ content => template("apache2/default-index.html");
- exec { "reload-apache2":
- command => "/etc/init.d/apache2 reload",
- refreshonly => true,
- }
+ # sometimes this is a symlink
+ #"/var/log/apache2":
+ # mode => 755,
+ # ensure => directory;
+ }
- exec { "force-reload-apache2":
- command => "/etc/init.d/apache2 force-reload",
- refreshonly => true,
- }
- @ferm::rule { "dsa-http-limit":
- prio => "20",
- description => "limit HTTP DOS",
- rule => "chain 'http_limit' { mod limit limit-burst 60 limit 15/minute jump ACCEPT; jump DROP; }"
- }
- @ferm::rule { "dsa-http-soso":
- prio => "21",
- description => "slow yahoo spider",
- rule => "chain 'limit_sosospider' { mod connlimit connlimit-above 2 connlimit-mask 21 jump DROP; jump http_limit; }"
- }
- @ferm::rule { "dsa-http-yahoo":
- prio => "21",
- description => "slow yahoo spider",
- rule => "chain 'limit_yahoo' { mod connlimit connlimit-above 2 connlimit-mask 16 jump DROP; jump http_limit; }"
- }
- @ferm::rule { "dsa-http-rules":
- prio => "22",
- description => "http subchain",
- rule => "chain 'http' { saddr ( 74.6.22.182 74.6.18.240 ) jump limit_yahoo; saddr 124.115.0.0/21 jump limit_sosospider; mod recent name HTTPDOS update seconds 1800 jump log_or_drop; mod hashlimit hashlimit-name HTTPDOS hashlimit-mode srcip hashlimit-burst 600 hashlimit 30/minute jump ACCEPT; mod recent name HTTPDOS set jump log_or_drop; }"
- }
- @ferm::rule { "dsa-http":
- prio => "23",
- description => "Allow web access",
- rule => "proto tcp dport http jump http;"
- }
- @ferm::rule { "dsa-http-v6":
- domain => "(ip6)",
- prio => "23",
- description => "Allow web access",
- rule => "&SERVICE(tcp, 80)"
- }
+ exec {
+ "reload-apache2":
+ command => "/etc/init.d/apache2 reload",
+ refreshonly => true;
+ "force-reload-apache2":
+ command => "/etc/init.d/apache2 force-reload",
+ refreshonly => true;
+ }
+
+ @ferm::rule { "dsa-http-limit":
+ prio => "20",
+ description => "limit HTTP DOS",
+ rule => "chain 'http_limit' { mod limit limit-burst 60 limit 15/minute jump ACCEPT; jump DROP; }"
+ }
+ @ferm::rule { "dsa-http-soso":
+ prio => "21",
+ description => "slow yahoo spider",
+ rule => "chain 'limit_sosospider' { mod connlimit connlimit-above 2 connlimit-mask 21 jump DROP; jump http_limit; }"
+ }
+ @ferm::rule { "dsa-http-yahoo":
+ prio => "21",
+ description => "slow yahoo spider",
+ rule => "chain 'limit_yahoo' { mod connlimit connlimit-above 2 connlimit-mask 16 jump DROP; jump http_limit; }"
+ }
+ @ferm::rule { "dsa-http-rules":
+ prio => "22",
+ description => "http subchain",
+ rule => "chain 'http' { saddr ( 74.6.22.182 74.6.18.240 ) jump limit_yahoo; saddr 124.115.0.0/21 jump limit_sosospider; mod recent name HTTPDOS update seconds 1800 jump log_or_drop; mod hashlimit hashlimit-name HTTPDOS hashlimit-mode srcip hashlimit-burst 600 hashlimit 30/minute jump ACCEPT; mod recent name HTTPDOS set jump log_or_drop; }"
+ }
+ @ferm::rule { "dsa-http":
+ prio => "23",
+ description => "Allow web access",
+ rule => "proto tcp dport http jump http;"
+ }
+ @ferm::rule { "dsa-http-v6":
+ domain => "(ip6)",
+ prio => "23",
+ description => "Allow web access",
+ rule => "&SERVICE(tcp, 80)"
+ }
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
class apache2::security_mirror inherits apache2 {
- file {
- "/etc/apache2/sites-available/security.debian.org":
- source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/sites-available/security.debian.org",
- "puppet:///apache2/common/etc/apache2/sites-available/security.debian.org" ];
+ file {
+ "/etc/apache2/sites-available/security.debian.org":
+ source => [ "puppet:///apache2/per-host/$fqdn/etc/apache2/sites-available/security.debian.org",
+ "puppet:///apache2/common/etc/apache2/sites-available/security.debian.org" ];
- }
+ }
- activate_apache_site {
- "010-security.debian.org": site => "security.debian.org";
- "security.debian.org": ensure => absent;
- }
+ activate_apache_site {
+ "010-security.debian.org": site => "security.debian.org";
+ "security.debian.org": ensure => absent;
+ }
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
class apt-keys {
file {
"/etc/apt/trusted-keys.d/":
- ensure => directory,
- purge => true,
- notify => Exec["apt-keys-update"],
- ;
+ ensure => directory,
+ purge => true,
+ notify => Exec["apt-keys-update"],
+ ;
"/etc/apt/trusted-keys.d/backports.org.asc":
- source => "puppet:///apt-keys/backports.org.asc",
- mode => 664,
- notify => Exec["apt-keys-update"],
- ;
+ source => "puppet:///apt-keys/backports.org.asc",
+ mode => 664,
+ notify => Exec["apt-keys-update"],
+ ;
"/etc/apt/trusted-keys.d/db.debian.org.asc":
- source => "puppet:///apt-keys/db.debian.org.asc",
- mode => 664,
- notify => Exec["apt-keys-update"],
- ;
+ source => "puppet:///apt-keys/db.debian.org.asc",
+ mode => 664,
+ notify => Exec["apt-keys-update"],
+ ;
}
exec { "apt-keys-update":
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
class buildd {
- package {
- "sbuild": ensure => installed;
- "buildd": ensure => installed;
- "buildd-builder-meta": ensure => installed;
- "apt-transport-https": ensure => installed;
- "debootstrap": ensure => installed;
- }
-
- file {
- "/etc/apt/sources.list.d/buildd.list":
+ package {
+ "sbuild": ensure => installed;
+ "buildd": ensure => installed;
+ "buildd-builder-meta": ensure => installed;
+ "apt-transport-https": ensure => installed;
+ "debootstrap": ensure => installed;
+ }
+
+ file {
+ "/etc/apt/sources.list.d/buildd.list":
content => template("buildd/etc/apt/sources.list.d/buildd.list.erb"),
require => Package["apt-transport-https"],
notify => Exec["apt-get update"],
;
-
- "/etc/apt/trusted-keys.d/buildd.debian.org.asc":
- source => "puppet:///buildd/buildd.debian.org.asc",
- mode => 664,
- notify => Exec["apt-keys-update"],
- ;
- "/etc/schroot/mount-defaults":
- source => "puppet:///buildd/mount-defaults",
- require => Package["sbuild"]
- ;
- "/etc/cron.d/dsa-buildd":
- source => "puppet:///buildd/cron.d-dsa-buildd",
- require => Package["cron"]
- ;
- }
+
+ "/etc/apt/trusted-keys.d/buildd.debian.org.asc":
+ source => "puppet:///buildd/buildd.debian.org.asc",
+ mode => 664,
+ notify => Exec["apt-keys-update"],
+ ;
+ "/etc/schroot/mount-defaults":
+ source => "puppet:///buildd/mount-defaults",
+ require => Package["sbuild"]
+ ;
+ "/etc/cron.d/dsa-buildd":
+ source => "puppet:///buildd/cron.d-dsa-buildd",
+ require => Package["cron"]
+ ;
+ }
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
class clamav {
- package { "clamav-daemon": ensure => installed;
- "clamav-freshclam": ensure => installed;
- "clamav-unofficial-sigs": ensure => installed;
+ package {
+ "clamav-daemon": ensure => installed;
+ "clamav-freshclam": ensure => installed;
+ "clamav-unofficial-sigs": ensure => installed;
}
file {
"/etc/clamav-unofficial-sigs.dsa.conf":
- require => Package["clamav-unofficial-sigs"],
- source => [ "puppet:///clamav/clamav-unofficial-sigs.dsa.conf" ]
- ;
+ require => Package["clamav-unofficial-sigs"],
+ source => [ "puppet:///clamav/clamav-unofficial-sigs.dsa.conf" ]
+ ;
"/etc/clamav-unofficial-sigs.conf":
- require => Package["clamav-unofficial-sigs"],
- source => [ "puppet:///clamav/clamav-unofficial-sigs.conf" ]
- ;
+ require => Package["clamav-unofficial-sigs"],
+ source => [ "puppet:///clamav/clamav-unofficial-sigs.conf" ]
+ ;
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
define sysctl($key, $value, $ensure=present) {
- file { "/etc/sysctl.d/$name.conf":
- ensure => $ensure,
- owner => root,
- group => root,
- mode => 0644,
- content => "$key = $value\n",
- notify => Exec["procps restart"],
+ file {
+ "/etc/sysctl.d/$name.conf":
+ ensure => $ensure,
+ owner => root,
+ group => root,
+ mode => 0644,
+ content => "$key = $value\n",
+ notify => Exec["procps restart"],
}
}
define set_alternatives($linkto) {
- exec { "/usr/sbin/update-alternatives --set $name $linkto":
+ exec {
+ "/usr/sbin/update-alternatives --set $name $linkto":
unless => "/bin/sh -c '! [ -e $linkto ] || ! [ -e /etc/alternatives/$name ] || ([ -L /etc/alternatives/$name ] && [ /etc/alternatives/$name -ef $linkto ])'"
}
}
class debian-org {
-
- package { "userdir-ldap": ensure => installed;
- "zsh": ensure => installed;
- "cron": ensure => installed;
- "apt-utils": ensure => installed;
- "tcsh": ensure => installed;
- "pdksh": ensure => installed;
- "ksh": ensure => installed;
- "csh": ensure => installed;
- "locales-all": ensure => installed;
- "libpam-pwdfile": ensure => installed;
- "vim": ensure => installed;
- "gnupg": ensure => installed;
- "bzip2": ensure => installed;
- "less": ensure => installed;
- "ed": ensure => installed;
- "puppet": ensure => installed;
- "mtr-tiny": ensure => installed;
- "nload": ensure => installed;
- "pciutils": ensure => installed;
- "dnsutils": ensure => installed;
- "bash-completion": ensure => installed;
- "libfilesystem-ruby1.8": ensure => installed;
- "syslog-ng": ensure => installed;
- "sysklogd": ensure => purged;
- "klogd": ensure => purged;
- "rsyslog": ensure => purged;
- }
- file {
- "/etc/apt/preferences":
- source => "puppet:///files/etc/apt/preferences";
- "/etc/apt/sources.list.d/backports.org.list":
- content => template("debian-org/etc/apt/sources.list.d/backports.org.list.erb"),
- notify => Exec["apt-get update"];
- "/etc/apt/sources.list.d/debian.org.list":
- content => template("debian-org/etc/apt/sources.list.d/debian.org.list.erb"),
- notify => Exec["apt-get update"];
- "/etc/apt/sources.list.d/security.list":
- content => template("debian-org/etc/apt/sources.list.d/security.list.erb"),
- notify => Exec["apt-get update"];
- "/etc/apt/sources.list.d/volatile.list":
- content => template("debian-org/etc/apt/sources.list.d/volatile.list.erb"),
- notify => Exec["apt-get update"];
- "/etc/apt/apt.conf.d/local-recommends":
- source => "puppet:///files/etc/apt/apt.conf.d/local-recommends";
- "/etc/apt/apt.conf.d/local-pdiffs":
- source => "puppet:///files/etc/apt/apt.conf.d/local-pdiffs";
- "/etc/timezone":
- source => "puppet:///files/etc/timezone",
- notify => Exec["dpkg-reconfigure tzdata -pcritical -fnoninteractive"];
- "/etc/puppet/puppet.conf":
- require => Package["puppet"],
- source => "puppet:///files/etc/puppet/puppet.conf"
- ;
- "/etc/default/puppet":
- require => Package["puppet"],
- source => "puppet:///files/etc/default/puppet"
- ;
-
- "/etc/syslog-ng/syslog-ng.conf":
- content => template("syslog-ng.conf.erb"),
- require => Package["syslog-ng"],
- notify => Exec["syslog-ng reload"],
- ;
- "/etc/logrotate.d/syslog-ng":
- require => Package["syslog-ng"],
- source => "puppet:///files/etc/logrotate.d/syslog-ng",
- ;
- "/etc/cron.d/dsa-puppet-stuff":
- source => "puppet:///files/etc/cron.d/dsa-puppet-stuff",
- require => Package["cron"]
- ;
- "/etc/ldap/ldap.conf":
- require => Package["userdir-ldap"],
- source => "puppet:///files/etc/ldap/ldap.conf",
- ;
- "/etc/pam.d/common-session":
- require => Package["libpam-pwdfile"],
- source => "puppet:///files/etc/pam.d/common-session",
- ;
- }
- case $hostname {
+ package {
+ "userdir-ldap": ensure => installed;
+ "zsh": ensure => installed;
+ "cron": ensure => installed;
+ "apt-utils": ensure => installed;
+ "tcsh": ensure => installed;
+ "pdksh": ensure => installed;
+ "ksh": ensure => installed;
+ "csh": ensure => installed;
+ "locales-all": ensure => installed;
+ "libpam-pwdfile": ensure => installed;
+ "vim": ensure => installed;
+ "gnupg": ensure => installed;
+ "bzip2": ensure => installed;
+ "less": ensure => installed;
+ "ed": ensure => installed;
+ "puppet": ensure => installed;
+ "mtr-tiny": ensure => installed;
+ "nload": ensure => installed;
+ "pciutils": ensure => installed;
+ "dnsutils": ensure => installed;
+ "bash-completion": ensure => installed;
+ "libfilesystem-ruby1.8": ensure => installed;
+ "syslog-ng": ensure => installed;
+ "sysklogd": ensure => purged;
+ "klogd": ensure => purged;
+ "rsyslog": ensure => purged;
+ }
+ file {
+ "/etc/apt/preferences":
+ source => "puppet:///files/etc/apt/preferences";
+ "/etc/apt/sources.list.d/backports.org.list":
+ content => template("debian-org/etc/apt/sources.list.d/backports.org.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/sources.list.d/debian.org.list":
+ content => template("debian-org/etc/apt/sources.list.d/debian.org.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/sources.list.d/security.list":
+ content => template("debian-org/etc/apt/sources.list.d/security.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/sources.list.d/volatile.list":
+ content => template("debian-org/etc/apt/sources.list.d/volatile.list.erb"),
+ notify => Exec["apt-get update"];
+ "/etc/apt/apt.conf.d/local-recommends":
+ source => "puppet:///files/etc/apt/apt.conf.d/local-recommends";
+ "/etc/apt/apt.conf.d/local-pdiffs":
+ source => "puppet:///files/etc/apt/apt.conf.d/local-pdiffs";
+ "/etc/timezone":
+ source => "puppet:///files/etc/timezone",
+ notify => Exec["dpkg-reconfigure tzdata -pcritical -fnoninteractive"];
+ "/etc/puppet/puppet.conf":
+ require => Package["puppet"],
+ source => "puppet:///files/etc/puppet/puppet.conf"
+ ;
+ "/etc/default/puppet":
+ require => Package["puppet"],
+ source => "puppet:///files/etc/default/puppet"
+ ;
+
+ "/etc/syslog-ng/syslog-ng.conf":
+ content => template("syslog-ng.conf.erb"),
+ require => Package["syslog-ng"],
+ notify => Exec["syslog-ng reload"],
+ ;
+ "/etc/logrotate.d/syslog-ng":
+ require => Package["syslog-ng"],
+ source => "puppet:///files/etc/logrotate.d/syslog-ng",
+ ;
+ "/etc/cron.d/dsa-puppet-stuff":
+ source => "puppet:///files/etc/cron.d/dsa-puppet-stuff",
+ require => Package["cron"]
+ ;
+ "/etc/ldap/ldap.conf":
+ require => Package["userdir-ldap"],
+ source => "puppet:///files/etc/ldap/ldap.conf",
+ ;
+ "/etc/pam.d/common-session":
+ require => Package["libpam-pwdfile"],
+ source => "puppet:///files/etc/pam.d/common-session",
+ ;
+ }
+ case $hostname {
handel: {
file {
- "/etc/puppet/lib":
- ensure => directory,
- source => "puppet:///files/etc/puppet/lib",
- recurse => true,
- notify => Exec["puppetmaster restart"];
- }
- }
- default: {}
- }
-
- # set mmap_min_addr to 4096 to mitigate
- # Linux NULL-pointer dereference exploits
- sysctl { "mmap_min_addr" :
- key => "vm.mmap_min_addr",
- value => 4096,
- }
-
- set_alternatives { "editor":
- linkto => "/usr/bin/vim.basic",
- }
-
- exec { "syslog-ng reload":
- path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
- refreshonly => true,
- }
- exec { "dpkg-reconfigure tzdata -pcritical -fnoninteractive":
- path => "/usr/bin:/usr/sbin:/bin:/sbin",
- refreshonly => true,
- }
- exec { "apt-get update":
- command => 'apt-get update',
- path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
- refreshonly => true
- }
- exec { "puppetmaster restart":
- path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
- refreshonly => true,
- }
- exec { "procps restart":
- path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
- refreshonly => true,
- }
+ "/etc/puppet/lib":
+ ensure => directory,
+ source => "puppet:///files/etc/puppet/lib",
+ recurse => true,
+ notify => Exec["puppetmaster restart"];
+ }
+ }
+ }
+
+ # set mmap_min_addr to 4096 to mitigate
+ # Linux NULL-pointer dereference exploits
+ sysctl {
+ "mmap_min_addr" :
+ key => "vm.mmap_min_addr",
+ value => 4096,
+ }
+
+ set_alternatives {
+ "editor":
+ linkto => "/usr/bin/vim.basic",
+ }
+
+ exec {
+ "syslog-ng reload":
+ path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+ refreshonly => true;
+ "dpkg-reconfigure tzdata -pcritical -fnoninteractive":
+ path => "/usr/bin:/usr/sbin:/bin:/sbin",
+ refreshonly => true;
+ "apt-get update":
+ command => 'apt-get update',
+ path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+ refreshonly => true;
+ "puppetmaster restart":
+ path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+ refreshonly => true;
+ "procps restart":
+ path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+ refreshonly => true;
+ }
}
class debian-proliant inherits debian-org {
- package {
- "hpacucli": ensure => installed;
- "hp-health": ensure => installed;
- "cpqarrayd": ensure => installed;
- "arrayprobe": ensure => installed;
- }
- case $debarchitecture {
- "amd64": {
- package { "lib32gcc1": ensure => installed; }
- }
- }
- file {
- "/etc/apt/sources.list.d/debian.restricted.list":
- content => template("debian-org/etc/apt/sources.list.d/debian.restricted.list.erb"),
- notify => Exec["apt-get update"];
- }
+ package {
+ "hpacucli": ensure => installed;
+ "hp-health": ensure => installed;
+ "cpqarrayd": ensure => installed;
+ "arrayprobe": ensure => installed;
+ }
+ case $debarchitecture {
+ "amd64": {
+ package { "lib32gcc1": ensure => installed; }
+ }
+ }
+ file {
+ "/etc/apt/sources.list.d/debian.restricted.list":
+ content => template("debian-org/etc/apt/sources.list.d/debian.restricted.list.erb"),
+ notify => Exec["apt-get update"];
+ }
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
rule => "&SERVICE(tcp, 113)"
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
# vim:set et:
-# vim:set ts=4:
+# vim:set sts=4 ts=4:
# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
refreshonly => true
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
rule => "proto tcp mod state state (NEW) dport (5666) @subchain 'nagios' { saddr (\$HOST_NAGIOS_V6) ACCEPT; }"
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
nagios-nrpe-server: ensure => installed;
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
refreshonly => true,
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
-# vim: set fdm=marker ts=8 sw=8 et:
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
-# vim: set fdm=marker ts=8 sw=8 et:
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
rule => "&SERVICE(udp, 123)"
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
# vim:set et:
-# vim:set ts=4:
+# vim:set sts=4 ts=4:
# vim:set shiftwidth=4:
refreshonly => true,
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
# vim:set et:
-# vim:set ts=4:
+# vim:set sts=4 ts=4:
# vim:set shiftwidth=4:
content => template("resolv/resolv.conf.erb");
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
refreshonly => true,
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
rule => "&SERVICE_RANGE(tcp, ssh, \$SSH_V6_SOURCES)"
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4:
}
}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4: