Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
define nrpe_command ($command, $parameters, $cplugdir="auto") { # find out the default nagios paths for plugis $defaultdir = $architecture ? { "x86_64" => "/usr/lib64/nagios/plugins", default => "/usr/lib/nagios/plugins" } # if we overrode cplugdir then use that, else go with the nagios default # for this architecture case $cplugdir { auto: { $plugdir = $defaultdir } default: { $plugdir = $cplugdir } } file {"/etc/nagios/nrpe.d/$name.cfg": owner => root, group => root, mode => 644, content => template("nrpe-config.erb"), require => File["/etc/nagios/nrpe.d"], } }
This paste will be private.
From the Design Piracy series on my blog: