Skip to content

Instantly share code, notes, and snippets.

@foswiki
Created November 13, 2009 22:54
Show Gist options
  • Save foswiki/234243 to your computer and use it in GitHub Desktop.
Save foswiki/234243 to your computer and use it in GitHub Desktop.
libarch = case node[:kernel][:machine]
when 'x86_64' then 'lib64'
else 'lib'
end
template "/etc/nagios/nrpe.cfg" do
source "nrpe.erb"
mode "0644"
owner "root"
group "root"
notifies :restart, resources(:service => "nrpe")
end
--- And the ERB
command[check_users]=/usr/<%= @libarch %>/nagios/plugins/check_users -w 5 -c 10
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment