Skip to content

Instantly share code, notes, and snippets.

@jsierles
Created February 3, 2009 21:27
Show Gist options
  • Save jsierles/57773 to your computer and use it in GitHub Desktop.
Save jsierles/57773 to your computer and use it in GitHub Desktop.
define :nagios_conf, :variables => {}, :config_subdir => true do
subdir = if params[:config_subdir]
"/#{node[:nagios][:config_subdir]}/"
else
"/"
end
template "#{node[:nagios][:root]}#{subdir}#{params[:name]}.cfg" do
owner "nagios"
group "nagios"
source "#{params[:name]}.cfg.erb"
mode 0440
variables params[:variables]
notifies :restart, resources(:service => "nagios3")
end
end
###
nagios_conf "commands"
nagios_conf "contacts"
nagios_conf "notification_commands"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment