summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2015-09-15 11:19:00 -0700
committerdanielsdeleo <dan@chef.io>2015-09-17 14:29:50 -0700
commit460a7ec5347891d6615b7f88944cbd76998769b1 (patch)
treebdcb8d63e517574c27d2736bb6ab63305a9b1b97
parent3ca6231a7908e2c54c679c187a46ae10dfe21396 (diff)
downloadchef-460a7ec5347891d6615b7f88944cbd76998769b1.tar.gz
Add default policyfile settings to config
-rw-r--r--chef-config/lib/chef-config/config.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index a3f06e9b23..76ee589ff9 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -339,10 +339,27 @@ module ChefConfig
# most of our testing scenarios)
default :minimal_ohai, false
+ ###
+ # Policyfile Settings
+ #
# Policyfile is a feature where a node gets its run list and cookbook
# version set from a single document on the server instead of expanding the
# run list and having the server compute the cookbook version set based on
# environment constraints.
+ #
+ # Policyfiles are auto-versioned. The user groups nodes by `policy_name`,
+ # which generally describes a hosts's functional role, and `policy_group`,
+ # which generally groups nodes by deployment phase (a.k.a., "environment").
+ # The Chef Server maps a given set of `policy_name` plus `policy_group` to
+ # a particular revision of a policy.
+
+ default :policy_name, nil
+ default :policy_group, nil
+
+ # During initial development, users were required to set `use_policyfile true`
+ # in `client.rb` to opt-in to policyfile use. Chef Client now examines
+ # configuration, node json, and the stored node to determine if policyfile
+ # usage is desired. This flag is still honored if set, but is unnecessary.
default :use_policyfile, false
# Policyfiles can be used in a native mode (default) or compatibility mode.
@@ -356,6 +373,16 @@ module ChefConfig
# policyfiles with servers that don't yet support the native endpoints.
default :policy_document_native_api, true
+ # When policyfiles are used in compatibility mode, `policy_name` and
+ # `policy_group` are instead specified using a combined configuration
+ # setting, `deployment_group`. For example, if policy_name should be
+ # "webserver" and policy_group should be "staging", then `deployment_group`
+ # should be set to "webserver-staging", which is the name of the data bag
+ # item that the policy will be stored as. NOTE: this setting only has an
+ # effect if `policy_document_native_api` is set to `false`.
+ default :deployment_group, nil
+
+
# Set these to enable SSL authentication / mutual-authentication
# with the server