diff options
author | Lance Albertson <lance@osuosl.org> | 2020-06-13 16:33:26 -0700 |
---|---|---|
committer | Lance Albertson <lance@osuosl.org> | 2020-06-28 18:50:56 -0700 |
commit | 75603f7b8243a4d3d4a76c1700717f1d945c6374 (patch) | |
tree | b24d862956bd0f8ca2837ffa972c9edd222b6295 | |
parent | a11936dff401b59cd2eddd2cf48092e0b504f6e8 (diff) | |
download | chef-75603f7b8243a4d3d4a76c1700717f1d945c6374.tar.gz |
Implement ENFORCE_LICENSE dist constant for knife bootstrap
As a user of a community Chef distribution, I would like to be able to use knife
bootstrap without requiring the license check [1]. It's expected that that user
would not be installing a licensed version of Chef Infra Client, but instead a
community distribution.
This provides a similar feature as used in other places which makes it much
easier to disable the license check.
[1] https://gitlab.com/cinc-project/distribution/workstation/-/issues/3
Signed-off-by: Lance Albertson <lance@osuosl.org>
-rw-r--r-- | chef-config/lib/chef-config/dist.rb | 3 | ||||
-rw-r--r-- | lib/chef/knife/bootstrap.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/chef-config/lib/chef-config/dist.rb b/chef-config/lib/chef-config/dist.rb index e75b26730f..e69d39813d 100644 --- a/chef-config/lib/chef-config/dist.rb +++ b/chef-config/lib/chef-config/dist.rb @@ -19,5 +19,8 @@ module ChefConfig # The legacy conf folder: C:/opscode/chef. Specifically the "opscode" part # DIR_SUFFIX is appended to it in code where relevant LEGACY_CONF_DIR = "opscode".freeze + + # Enable forcing Chef EULA + ENFORCE_LICENSE = true end end diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 48ff008d22..2232448044 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -538,7 +538,7 @@ class Chef end def run - check_license + check_license if ChefConfig::Dist::ENFORCE_LICENSE plugin_setup! validate_name_args! |