user partitions fact in template

10 views
Skip to first unread message

Tim Dunphy

unread,
Feb 2, 2015, 8:27:14 PM2/2/15
to puppet...@googlegroups.com
Hey guys,

 I was thinking about turning my nrpe.cfg file into a template. So that I could customize lines like the following:

command[check_root]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/vda


I would need to use just the name of the partition out of the following list:

partitions => {"vda1"=>{"mount"=>"/", "filesystem"=>"ext4", "uuid"=>"4c951027-0926-4814-9ab2-622a633fe925", "size"=>"10483712"}}

So here I would want to use 'vda1'. How can I express this in a puppet template so that I use only this part of the fact? I'd want to be able to replace 'vda' in this example with 'vda1' from the partitions fact.

Thank you,
Tim



--
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Reply all
Reply to author
Forward
0 new messages