summaryrefslogtreecommitdiff
path: root/lib/chef/config.rb
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-05-12 11:49:01 -0700
committerClaire McQuin <claire@getchef.com>2014-05-15 14:04:19 -0700
commit68e33803973a51a461037426b8318320bcc57b34 (patch)
tree974d92b27159454465951a7ed766bd1f45b7023f /lib/chef/config.rb
parent831691edfb95a4f56d684819d698d81fdd517f2a (diff)
downloadchef-68e33803973a51a461037426b8318320bcc57b34.tar.gz
add whitelist config options for attributes saved by the node
Diffstat (limited to 'lib/chef/config.rb')
-rw-r--r--lib/chef/config.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb
index 35b07c24ea..92042d5248 100644
--- a/lib/chef/config.rb
+++ b/lib/chef/config.rb
@@ -558,6 +558,35 @@ class Chef
# the number of threads will help.
default :cookbook_sync_threads, 10
+ # A whitelisted map of attribute keys you want sent over the wire when node
+ # data is saved. We will only use the keys in this hash to whitelist attributes;
+ # if the value are anything than another hash, we will ignore them. (You can't
+ # magically morph into a blacklist with "false" as a value in the whitelist.)
+ #
+ # If your data looks like:
+ # { "filesystem" => {
+ # "/dev/disk0s2" => {
+ # "size" => "10mb"
+ # },
+ # "map - autohome' => {
+ # "size" => "10mb"
+ # }
+ # }
+ # }
+ # And your whitelist looks like:
+ # { "filesystem" => {
+ # "/dev/disk0s2" => true
+ # }
+ # }
+ # The entire "map - autohome" subtree will be dropped.
+ #
+ # The default setting is nil, which collects all data. Setting to {} will not
+ # collect any data for save.
+ default :automatic_attribute_whitelist, nil
+ default :default_attribute_whitelist, nil
+ default :normal_attribute_whitelist, nil
+ default :override_attribute_whitelist, nil
+
# If installed via an omnibus installer, this gives the path to the
# "embedded" directory which contains all of the software packaged with
# omnibus. This is used to locate the cacert.pem file on windows.