summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkos Vandra <axos88@gmail.com>2016-11-08 19:31:30 +0100
committerThom May <thom@may.lt>2016-11-08 18:31:30 +0000
commitce93d225ebd9c37e98d37fa830d00d19e2d3da3f (patch)
treeebf32b35e05b4485a4333c624b0e4a66db07ba61
parent5be96103238739f8124e1f62c67d64e5f1368025 (diff)
downloadchef-ce93d225ebd9c37e98d37fa830d00d19e2d3da3f.tar.gz
Fix converge_if_changed (#5508)
sensitive is the property of the resource, not the provider.
-rw-r--r--lib/chef/provider.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb
index 7cfddba0cb..399a26aca0 100644
--- a/lib/chef/provider.rb
+++ b/lib/chef/provider.rb
@@ -205,7 +205,7 @@ class Chef
specified_properties = properties.select { |property| new_resource.property_is_set?(property) }
modified = specified_properties.select { |p| new_resource.send(p) != current_resource.send(p) }
if modified.empty?
- properties_str = if sensitive
+ properties_str = if new_resource.sensitive
specified_properties.join(", ")
else
specified_properties.map { |p| "#{p}=#{new_resource.send(p).inspect}" }.join(", ")
@@ -217,7 +217,7 @@ class Chef
# Print the pretty green text and run the block
property_size = modified.map { |p| p.size }.max
modified.map! do |p|
- properties_str = if sensitive
+ properties_str = if new_resource.sensitive
"(suppressed sensitive property)"
else
"#{new_resource.send(p).inspect} (was #{current_resource.send(p).inspect})"
@@ -232,7 +232,7 @@ class Chef
property_size = properties.map { |p| p.size }.max
created = properties.map do |property|
default = " (default value)" unless new_resource.property_is_set?(property)
- properties_str = if sensitive
+ properties_str = if new_resource.sensitive
"(suppressed sensitive property)"
else
new_resource.send(property).inspect