Issue #3937 has been reported by Mario Verbelen.
----------------------------------------
Feature #3937: mounts list
http://projects.puppetlabs.com/issues/3937
Author: Mario Verbelen
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Keywords:
Branch:
I use myself a mount list for monitoring purposes
So here the code I use
mounts.rb
<pre>Facter.add("mounts") do
mounts = []
mntpoints=`mount -t ext2,ext3,ext4,reiserfs`
mntpoints.split(/\n/).each do |m|
mount = m.split(/ /)[2]
mounts << mount
end
setcode do
mounts.join(',')
end
end</pre>
output:
<pre>10:48:15|r...@leo:~ 0 # facter mounts
/,/boot,/home,/usr,/var,/tmp,/data</pre>
In the template for snmpd.conf.erb I use
<pre><%- if has_variable?("mounts") then
mounts.split(',').each do |val| -%>
disk <%= val %>
<% end end -%></pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.