Merge branch 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet
authorPeter Palfrader <peter@palfrader.org>
Fri, 24 Jul 2009 18:09:31 +0000 (20:09 +0200)
committerPeter Palfrader <peter@palfrader.org>
Fri, 24 Jul 2009 18:09:31 +0000 (20:09 +0200)
* 'master' of ssh://handel.debian.org/srv/puppet.debian.org/git/dsa-puppet:
  Add host based blacklist
  Will this fix it?  Who knows?  Who understands the mystery of the puppet?

facts/raidarray.rb [new file with mode: 0644]
facts/raidcontroller.rb [deleted file]
modules/exim/files/common/host_blacklist [new file with mode: 0644]
modules/exim/manifests/init.pp

diff --git a/facts/raidarray.rb b/facts/raidarray.rb
new file mode 100644 (file)
index 0000000..8a09a71
--- /dev/null
@@ -0,0 +1,48 @@
+Facter.add("smartarraycontroller") do
+       confine :kernel => :linux
+       ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+       setcode do
+               ishp = "false"
+               lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
+               if $?.exitstatus == 0
+                       %x{lspci 2>&1}.each { |s|
+                               ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/
+                       }
+               end
+               ishp == "true"
+       end
+end
+
+Facter.add("mptcontroller") do
+       confine :kernel => :linux
+       setcode do
+               FileTest.exist?("/proc/mpt/summary")
+       end
+end
+
+Facter.add("3warecontroller") do
+       confine :kernel => :linux
+       setcode do
+               is3w = "false"
+               if FileTest.exist?("/proc/scsi/scsi")
+                       IO.foreach("/proc/scsi/scsi") { |x|
+                               is3w = "true" if x =~ /Vendor: 3ware/
+                       }
+               end
+               is3w == "true"
+       end
+end
+
+Facter.add("swraid") do
+       confine :kernel => :linux
+       setcode do
+                swraid = "false"
+               if FileTest.exist?("/proc/mdstat") && FileTest.exist?("/sbin/mdadm")
+                        IO.foreach("/proc/mdstat") { |x|
+                                swraid = "true" if x =~ /md[0-9]+ : active/
+                        }
+                end
+                swraid == "true"
+       end
+end
+
diff --git a/facts/raidcontroller.rb b/facts/raidcontroller.rb
deleted file mode 100644 (file)
index 8a09a71..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-Facter.add("smartarraycontroller") do
-       confine :kernel => :linux
-       ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
-       setcode do
-               ishp = "false"
-               lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
-               if $?.exitstatus == 0
-                       %x{lspci 2>&1}.each { |s|
-                               ishp = "true" if s =~ /RAID bus controller: (.*) Smart Array/
-                       }
-               end
-               ishp == "true"
-       end
-end
-
-Facter.add("mptcontroller") do
-       confine :kernel => :linux
-       setcode do
-               FileTest.exist?("/proc/mpt/summary")
-       end
-end
-
-Facter.add("3warecontroller") do
-       confine :kernel => :linux
-       setcode do
-               is3w = "false"
-               if FileTest.exist?("/proc/scsi/scsi")
-                       IO.foreach("/proc/scsi/scsi") { |x|
-                               is3w = "true" if x =~ /Vendor: 3ware/
-                       }
-               end
-               is3w == "true"
-       end
-end
-
-Facter.add("swraid") do
-       confine :kernel => :linux
-       setcode do
-                swraid = "false"
-               if FileTest.exist?("/proc/mdstat") && FileTest.exist?("/sbin/mdadm")
-                        IO.foreach("/proc/mdstat") { |x|
-                                swraid = "true" if x =~ /md[0-9]+ : active/
-                        }
-                end
-                swraid == "true"
-       end
-end
-
diff --git a/modules/exim/files/common/host_blacklist b/modules/exim/files/common/host_blacklist
new file mode 100644 (file)
index 0000000..3c1a7b8
--- /dev/null
@@ -0,0 +1,5 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+193.146.156.252
index a886850..3b51141 100644 (file)
@@ -27,6 +27,11 @@ class exim {
           source  => [ "puppet:///exim/per-host/$fqdn/manualroute",
                        "puppet:///exim/common/manualroute" ]
           ;
+        "/etc/exim4/host_blacklist":
+          require => Package["exim4-daemon-heavy"],
+          source  => [ "puppet:///exim/per-host/$fqdn/host_blacklist",
+                       "puppet:///exim/common/host_blacklist" ]
+          ;
         "/etc/exim4/blacklist":
           require => Package["exim4-daemon-heavy"],
           source  => [ "puppet:///exim/per-host/$fqdn/blacklist",