From e7d7606f3af730446e8209a938a8dc0c1b453861 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 10 Oct 2005 23:45:10 +0000 Subject: Copy all unknown fields in host definitions to resulting hostgroup definitions git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@25 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- build-nagios | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build-nagios') diff --git a/build-nagios b/build-nagios index 27e542c..2de7513 100755 --- a/build-nagios +++ b/build-nagios @@ -124,9 +124,11 @@ config['hostgroups'].each_pair{ |name, hg| hg['contact_groups'] = CONTACTGROUP unless hg.has_key?('contact_groups') f.puts "define hostgroup{" f.puts " hostgroup_name #{ name }" - f.puts " alias #{ hg['alias'] }" - f.puts " contact_groups #{ hg['contact_groups'] }" f.puts " members "+hg['members'].join(",") + hg.each_pair{ |key, value| + next if %w(members).include? key + f.puts " #{key} #{value}" + } f.puts "}" } -- cgit v1.2.3