summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-15 21:09:06 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-15 21:09:06 -0700
commit1b8af54b67e14b9818fc6218ca874136a8191543 (patch)
treefd15f5e82521571fa6a0502f6f1137a4d29f8401
parentb55d95e6ad978663202d9f311576237aeab3e38f (diff)
downloadchef-1b8af54b67e14b9818fc6218ca874136a8191543.tar.gz
add --target-mode to base class
this adds it to chef-solo Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/application/base.rb9
-rw-r--r--lib/chef/application/client.rb9
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/application/base.rb b/lib/chef/application/base.rb
index bfcfc4faef..e83f786805 100644
--- a/lib/chef/application/base.rb
+++ b/lib/chef/application/base.rb
@@ -186,6 +186,15 @@ class Chef::Application::Base < Chef::Application
description: "A memorial for Ezra Zygmuntowicz.",
boolean: true
+ option :target,
+ short: "-t TARGET",
+ long: "--target TARGET",
+ description: "Target #{Chef::Dist::PRODUCT} against a remote system or device",
+ proc: lambda { |target|
+ Chef::Log.warn "-- EXPERIMENTAL -- Target mode activated, resources and dsl may change without warning -- EXPERIMENTAL --"
+ target
+ }
+
attr_reader :chef_client_json
def setup_application
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 3a060298e3..876c16b27b 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -138,15 +138,6 @@ class Chef::Application::Client < Chef::Application::Base
description: "Use cached cookbooks without overwriting local differences from the #{Chef::Dist::SERVER_PRODUCT}.",
boolean: false
- option :target,
- short: "-t TARGET",
- long: "--target TARGET",
- description: "Target #{Chef::Dist::PRODUCT} against a remote system or device",
- proc: lambda { |target|
- Chef::Log.warn "-- EXPERIMENTAL -- Target mode activated, resources and dsl may change without warning -- EXPERIMENTAL --"
- target
- }
-
IMMEDIATE_RUN_SIGNAL = "1".freeze
RECONFIGURE_SIGNAL = "H".freeze