diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-04-02 19:52:21 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-04-02 19:52:21 -0700 |
commit | 8dcf5be92642700ee3f2aedb83484bcf0e2c159c (patch) | |
tree | 3f44abd8bef8e75f05f57cd1213f14418aabed7a /lib/chef/resource.rb | |
parent | 333e0695117f8a518b8f2729bc3f97a5bd6560e4 (diff) | |
download | chef-8dcf5be92642700ee3f2aedb83484bcf0e2c159c.tar.gz |
Change name_property to be identity and not desired_state by default
If no other property is an identity property then the name_property is
the default identity property. The name_property is also marked as not
being desired state by default (the 'name' should never change).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index 5153dd4910..e6a33dc71a 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -497,11 +497,22 @@ class Chef def state_for_resource_reporter state = {} state_properties = self.class.state_properties +# p = state_properties.find { |p| p.name_property? } +# if p +# pp p +# raise "boom" +# end + state_properties.each do |property| - if property.identity? || property.is_set?(self) + if property.is_set?(self) state[property.name] = property.sensitive? ? "*sensitive value suppressed*" : send(property.name) end end +# identity_properties = self.class.identity_properties +# pp identity_properties +# identity_properties.each do |property| +# state[property.name] = property.sensitive? ? "*sensitive value suppressed*" : send(property.name) +# end state end |