diff options
author | Peter Palfrader <peter@palfrader.org> | 2005-10-04 12:03:59 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2005-10-04 12:03:59 +0000 |
commit | 84b79fb7ab439abbe9054a47c3d706adee83db19 (patch) | |
tree | 08ccaffa1c9bfe79d4cbb3c9b1a1b9f35b8a0fcd | |
parent | cbaabdc7e5636ae4a40ed5fd864d66912c36f037 (diff) |
Catch missing hostgroup def
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@22 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-x | build-nagios | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/build-nagios b/build-nagios index 2d46742..d6f1548 100755 --- a/build-nagios +++ b/build-nagios @@ -75,6 +75,7 @@ config['hostgroups'].each_value{ |hg| config['servers'].each_pair{ |name, server| server['hostgroups'].split(/,/).each{ |hg| hg.strip! + throw "Hostgroup #{hg} is not defined" unless config['hostgroups'].has_key?(hg) config['hostgroups'][hg]['members'] << name }; } |