summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-04-19 11:59:36 -0700
committerGitHub <noreply@github.com>2019-04-19 11:59:36 -0700
commit7c10725498ba884122b33bf8986fae921a8c5f4c (patch)
tree48b2362802fae4ac24e2983d0093dabbc5148b57
parent1c3c8e6bad996312f2ebc7d78afcaa84819ffff0 (diff)
parent39d3802b898dc43e2ca5a40a48129feb03e719ee (diff)
downloadchef-7c10725498ba884122b33bf8986fae921a8c5f4c.tar.gz
Merge pull request #8398 from chef/license_flag
Add placeholder license acceptance flags
-rw-r--r--lib/chef/application/apply.rb5
-rw-r--r--lib/chef/application/client.rb5
-rw-r--r--lib/chef/application/solo.rb5
-rw-r--r--lib/chef/knife/bootstrap.rb5
4 files changed, 20 insertions, 0 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index 5b697703d7..6c357e1b4f 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -113,6 +113,11 @@ class Chef::Application::Apply < Chef::Application
description: "Only run the bare minimum ohai plugins chef needs to function",
boolean: true
+ option :chef_license,
+ long: "--chef-license ACCEPTANCE",
+ description: "Placeholder option for Chef license acceptance to provide compatibility with Chef Infra 15+ command line options.",
+ required: false
+
attr_reader :json_attribs
def initialize
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index af77f6c584..0d674f0b52 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -302,6 +302,11 @@ class Chef::Application::Client < Chef::Application
description: "Use cached cookbooks without overwriting local differences from the server",
boolean: false
+ option :chef_license,
+ long: "--chef-license ACCEPTANCE",
+ description: "Placeholder option for Chef license acceptance to provide compatibility with Chef Infra 15+ command line options.",
+ required: false
+
IMMEDIATE_RUN_SIGNAL = "1".freeze
RECONFIGURE_SIGNAL = "H".freeze
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index ba9ba1c241..28308ce763 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -213,6 +213,11 @@ class Chef::Application::Solo < Chef::Application
description: "Run chef-solo in legacy mode",
boolean: true
+ option :chef_license,
+ long: "--chef-license ACCEPTANCE",
+ description: "Placeholder option for Chef license acceptance to provide compatibility with Chef Infra 15+ command line options.",
+ required: false
+
attr_reader :chef_client_json
# Get this party started
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index bdeee3394b..8b6344cecd 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -250,6 +250,11 @@ class Chef
Chef::Config[:knife][:bootstrap_vault_item]
}
+ option :chef_license,
+ long: "--chef-license ACCEPTANCE",
+ description: "Placeholder option for Chef license acceptance to provide compatibility with Chef Infra 15+ command line options.",
+ required: false
+
def initialize(argv = [])
super
@client_builder = Chef::Knife::Bootstrap::ClientBuilder.new(