summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/facter/mountpoints.rb28
-rw-r--r--manifests/apache.pp6
2 files changed, 18 insertions, 16 deletions
diff --git a/lib/facter/mountpoints.rb b/lib/facter/mountpoints.rb
index c51e6e6..da2f2a9 100644
--- a/lib/facter/mountpoints.rb
+++ b/lib/facter/mountpoints.rb
@@ -12,21 +12,23 @@ begin
require 'filesystem'
rescue Exception => e
confine :kernel => :linux
- ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
- fs_source = nil
- if FileTest.exists?("/etc/mtab")
- fs_source = "/etc/mtab"
- elsif FileTest.exists?("/proc/mounts")
- fs_source = "/proc/mounts"
- end
+ setcode do
+ ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+ fs_source = nil
+ if FileTest.exists?("/etc/mtab")
+ fs_source = "/etc/mtab"
+ elsif FileTest.exists?("/proc/mounts")
+ fs_source = "/proc/mounts"
+ end
- mounts = File.read(fs_source).split("\n")
- mounts.each do |mount|
- mount = mount.split(" ")
- if ((not ignorefs.include?(mount[2])) && (mount[3] !~ /bind/) && (not devices.include?(mount[0])) && (not mountpoints.include?(mount[1])))
- mountpoints.push(mount[1])
+ mounts = File.read(fs_source).split("\n")
+ mounts.each do |mount|
+ mount = mount.split(" ")
+ if ((not ignorefs.include?(mount[2])) && (mount[3] !~ /bind/) && (not devices.include?(mount[0])) && (not mountpoints.include?(mount[1])))
+ mountpoints.push(mount[1])
+ end
+ devices.push(mount[0]) if not devices.include?(mount[0])
end
- devices.push(mount[0]) if not devices.include?(mount[0])
end
else
FileSystem.mounts.each do |m|
diff --git a/manifests/apache.pp b/manifests/apache.pp
index a90d0ee..b89ff5d 100644
--- a/manifests/apache.pp
+++ b/manifests/apache.pp
@@ -14,9 +14,9 @@ class nagios::apache(
'debian': {
file { "${nagios::defaults::vars::int_cfgdir}/apache2.conf":
ensure => present,
- source => [ "puppet:///site_nagios/configs/${::fqdn}/apache2.conf",
- "puppet:///site_nagios/configs/apache2.conf",
- "puppet:///nagios/configs/apache2.conf"],
+ source => [ "puppet:///modules/site_nagios/configs/${::fqdn}/apache2.conf",
+ "puppet:///modules/site_nagios/configs/apache2.conf",
+ "puppet:///modules/nagios/configs/apache2.conf"],
}
apache::config::global { "nagios3.conf":