summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2011-01-03 11:32:39 -0800
committerJesse Wolfe <jes5199@gmail.com>2011-01-03 11:32:39 -0800
commit10f89de6e55429fcb055b15a513d01e6e20f03b9 (patch)
treeb5ac1ba62232760b46db657284d411e1959ceaa0 /lib/puppet/application
parentf1abd3c16eccfac60a19462a244c55924b737c2d (diff)
parent06a8d1ee8775ba8693ced002f5972bbfc346ebf8 (diff)
Merge branch 'ticket/2.6.next/5698' into 2.6.next
Diffstat (limited to 'lib/puppet/application')
-rw-r--r--lib/puppet/application/inspect.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/puppet/application/inspect.rb b/lib/puppet/application/inspect.rb
index 2f068a271..c7be893c7 100644
--- a/lib/puppet/application/inspect.rb
+++ b/lib/puppet/application/inspect.rb
@@ -62,8 +62,12 @@ class Puppet::Application::Inspect < Puppet::Application
status = Puppet::Resource::Status.new(ral_resource)
audited_attributes.each do |name|
- event = ral_resource.event(:previous_value => audited_resource[name], :property => name, :status => "audit", :message => "inspected value is #{audited_resource[name].inspect}")
- status.add_event(event)
+ next if audited_resource[name].nil?
+ # Skip :absent properties of :absent resources. Really, it would be nicer if the RAL returned nil for those, but it doesn't. ~JW
+ if name == :ensure or audited_resource[:ensure] != :absent or audited_resource[name] != :absent
+ event = ral_resource.event(:previous_value => audited_resource[name], :property => name, :status => "audit", :message => "inspected value is #{audited_resource[name].inspect}")
+ status.add_event(event)
+ end
end
@report.add_resource_status(status)
end