X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=manifests%2Fsite.pp;h=e939261b44b6dc9547e42e1865455b3ed8effcfc;hb=3f2101f7122e86ccef1513263bd894eb801d4c24;hp=54711fe03f9453913eb55ead12cf8fcd892fbc1d;hpb=d90e56e8dce02e7dddf90367de47a1e6e78d8e0e;p=mirror%2Fdsa-puppet.git diff --git a/manifests/site.pp b/manifests/site.pp index 54711fe03..e939261b4 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1,86 +1,73 @@ Package { - require => File["/etc/apt/apt.conf.d/local-recommends"] + require => File['/etc/apt/apt.conf.d/local-recommends'] } File { - owner => root, - group => root, - mode => 444, - ensure => file, + owner => root, + group => root, + mode => '0444', + ensure => file, } Exec { - path => "/usr/bin:/usr/sbin:/bin:/sbin" + path => '/usr/bin:/usr/sbin:/bin:/sbin' +} + +Service { + hasrestart => true, + hasstatus => true, } node default { - $localinfo = yamlinfo('*', "/etc/puppet/modules/debian-org/misc/local.yaml") - $nodeinfo = nodeinfo($fqdn, "/etc/puppet/modules/debian-org/misc/local.yaml") - $hoster = whohosts($nodeinfo, "/etc/puppet/modules/debian-org/misc/hoster.yaml") - notice("hoster for ${fqdn} is ${hoster}") + # we really should rename this one + include deprecated + include base + + # this is magic: it will include whatever classes says we should + # include, based on the value of the "classes" array + hiera_include('classes') - $mxinfo = allnodeinfo("mXRecord") + include roles::pubsub::client + class { 'roles::udldap::client': + ensure => absent + } - include munin-node - include sudo - include ssh - include debian-org - include monit - include apt-keys - include ntp + if getfromhash($deprecated::nodeinfo, 'ganeti') { + include ganeti2 + } - include motd - include samhain + if $::kernel == 'Linux' { + include linux + include acpi + } - case $smartarraycontroller { - "true": { include debian-proliant } - } - case $kvmdomain { - "true": { package { acpid: ensure => installed } } - } + if $::hostname in [buxtehude,milanollo,lw01,lw02,lw03,lw04,lw09,lw10,senfter,gretchaninov,sibelius] { + include nfs_server + } - case $mta { - "exim4": { - case extractnodeinfo($nodeinfo, 'heavy_exim') { - "true": { include exim::mx } - default: { include exim } - } - } - } + if $::brokenhosts { + include hosts + } - case $hostname { - spohr: { - include nagios::server - } - default: { - include nagios::client + if $::samhain { + include samhain } - } - case $apache2 { - "true": { - case extractnodeinfo($nodeinfo, 'apache2_security_mirror') { - "true": { include apache2::security_mirror } - default: { include apache2 } - } - } - } + if $::hostname in [geo3,wieck] { + include debian_org::radvd + } - case extractnodeinfo($nodeinfo, 'buildd') { - "true": { include buildd } - } + if $::spamd { + munin::check { 'spamassassin': } + } - case $hostname { - rietz,raff,klecker,ravel,senfl: { include named::secondary } - } + if $::hostname == 'pkgmirror-csail' { + include varnish_pkgmirror + } - case $hostname { - geo1,geo2,geo3: { include named::geodns } - } - case $brokenhosts { - "true": { include hosts } - } - case $hoster { - "ubcece", "darmstadt", "ftcollins": { include resolv } - } + if $::apache2 { + if ! defined(Class['apache2']) { + fail('We have apache installed but no role pulled it in.') + } + } }