summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-01-14 15:33:48 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-11 08:41:16 +1100
commit671d73c1f7799e685ab484c91b7f92d16e21e256 (patch)
tree852cde95ff51d0eec8a3d96ccdaed7fd1afc8a9a /lib/puppet/util
parent063871fab0b96111d16b6df19511e1034cc02a42 (diff)
downloadpuppet-671d73c1f7799e685ab484c91b7f92d16e21e256.tar.gz
puppet-671d73c1f7799e685ab484c91b7f92d16e21e256.tar.xz
puppet-671d73c1f7799e685ab484c91b7f92d16e21e256.zip
Prefetching, and thus purging, Nagios resources now works
*only* if you use the default configuration file locations. In the end, this was a relatively minor change; most of the actual diff centers around making the code more readable so I could think my way into the fix, and adding tests for cases that were either untested or refactored slightly. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/util')
-rw-r--r--lib/puppet/util/nagios_maker.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/util/nagios_maker.rb b/lib/puppet/util/nagios_maker.rb
index a7aae4e70..316334929 100644
--- a/lib/puppet/util/nagios_maker.rb
+++ b/lib/puppet/util/nagios_maker.rb
@@ -42,6 +42,7 @@ module Puppet::Util::NagiosMaker
target = "/etc/nagios/#{full_name.to_s}.cfg"
provider = type.provide(:naginator, :parent => Puppet::Provider::Naginator, :default_target => target) {}
+ provider.nagios_type
type.desc "The Nagios type #{name.to_s}. This resource type is autogenerated using the
model developed in Naginator_, and all of the Nagios types are generated using the
@@ -51,6 +52,9 @@ module Puppet::Util::NagiosMaker
files. By default, the statements will be added to ``#{target}``, but
you can send them to a different file by setting their ``target`` attribute.
+ You can purge Nagios resources using the ``resources`` type, but *only*
+ in the default file locations. This is an architectural limitation.
+
.. _naginator: http://reductivelabs.com/trac/naginator
"
end