summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-05-02 20:07:48 -0700
committerTim Smith <tsmith@chef.io>2019-05-02 20:07:48 -0700
commitf889469109364e91f9c649620acd9d24e68489ee (patch)
tree8e2b48724412244cc0a8f147a40a5729e3f110b1 /lib
parentd1c50baa43106d842198dbc75fa616ffe6bc86d0 (diff)
downloadchef-f889469109364e91f9c649620acd9d24e68489ee.tar.gz
Fix up main binary help messages
Periods after each sentence Use the branding better Fix some weird capitalization Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/application/apply.rb26
-rw-r--r--lib/chef/application/client.rb84
-rw-r--r--lib/chef/application/exit_code.rb9
-rw-r--r--lib/chef/application/knife.rb44
-rw-r--r--lib/chef/application/solo.rb56
5 files changed, 110 insertions, 109 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index c25f0ed46e..34f0973b40 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -35,49 +35,49 @@ class Chef::Application::Apply < Chef::Application
option :execute,
short: "-e RECIPE_TEXT",
long: "--execute RECIPE_TEXT",
- description: "Execute resources supplied in a string",
+ description: "Execute resources supplied in a string.",
proc: nil
option :stdin,
short: "-s",
long: "--stdin",
- description: "Execute resources read from STDIN",
+ description: "Execute resources read from STDIN.",
boolean: true
option :json_attribs,
short: "-j JSON_ATTRIBS",
long: "--json-attributes JSON_ATTRIBS",
- description: "Load attributes from a JSON file or URL",
+ description: "Load attributes from a JSON file or URL.",
proc: nil
option :force_logger,
long: "--force-logger",
- description: "Use logger output instead of formatter output",
+ description: "Use logger output instead of formatter output.",
boolean: true,
default: false
option :force_formatter,
long: "--force-formatter",
- description: "Use formatter output instead of logger output",
+ description: "Use formatter output instead of logger output.",
boolean: true,
default: false
option :formatter,
short: "-F FORMATTER",
long: "--format FORMATTER",
- description: "output format to use",
+ description: "The output format to use.",
proc: lambda { |format| Chef::Config.add_formatter(format) }
option :log_level,
short: "-l LEVEL",
long: "--log_level LEVEL",
- description: "Set the log level (trace, debug, info, warn, error, fatal)",
+ description: "Set the log level (trace, debug, info, warn, error, fatal).",
proc: lambda { |l| l.to_sym }
option :help,
short: "-h",
long: "--help",
- description: "Show this message",
+ description: "Show this help message.",
on: :tail,
boolean: true,
show_options: true,
@@ -86,7 +86,7 @@ class Chef::Application::Apply < Chef::Application
option :version,
short: "-v",
long: "--version",
- description: "Show #{Chef::Dist::PRODUCT} version",
+ description: "Show #{Chef::Dist::PRODUCT} version.",
boolean: true,
proc: lambda { |v| puts "#{Chef::Dist::PRODUCT}: #{::Chef::VERSION}" },
exit: 0
@@ -94,12 +94,12 @@ class Chef::Application::Apply < Chef::Application
option :why_run,
short: "-W",
long: "--why-run",
- description: "Enable whyrun mode",
+ description: "Enable whyrun mode.",
boolean: true
option :profile_ruby,
long: "--[no-]profile-ruby",
- description: "Dump complete Ruby call graph stack of entire #{Chef::Dist::PRODUCT} run (expert only)",
+ description: "Dump complete Ruby call graph stack of entire #{Chef::Dist::PRODUCT} run (expert only).",
boolean: true,
default: false
@@ -107,11 +107,11 @@ class Chef::Application::Apply < Chef::Application
long: "--[no-]color",
boolean: true,
default: true,
- description: "Use colored output, defaults to enabled"
+ description: "Use colored output, defaults to enabled."
option :minimal_ohai,
long: "--minimal-ohai",
- description: "Only run the bare minimum ohai plugins #{Chef::Dist::CLIENT} needs to function",
+ description: "Only run the bare minimum Ohai plugins #{Chef::Dist::PRODUCT} needs to function.",
boolean: true
attr_reader :json_attribs
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index ee3e0f7f04..959c746f4a 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -41,11 +41,11 @@ class Chef::Application::Client < Chef::Application
option :config_file,
short: "-c CONFIG",
long: "--config CONFIG",
- description: "The configuration file to use"
+ description: "The configuration file to use."
option :config_option,
long: "--config-option OPTION=VALUE",
- description: "Override a single configuration option",
+ description: "Override a single configuration option.",
proc: lambda { |option, existing|
(existing ||= []) << option
existing
@@ -54,24 +54,24 @@ class Chef::Application::Client < Chef::Application
option :formatter,
short: "-F FORMATTER",
long: "--format FORMATTER",
- description: "output format to use",
+ description: "The output format to use.",
proc: lambda { |format| Chef::Config.add_formatter(format) }
option :force_logger,
long: "--force-logger",
- description: "Use logger output instead of formatter output",
+ description: "Use logger output instead of formatter output.",
boolean: true,
default: false
option :force_formatter,
long: "--force-formatter",
- description: "Use formatter output instead of logger output",
+ description: "Use formatter output instead of logger output.",
boolean: true,
default: false
option :profile_ruby,
long: "--[no-]profile-ruby",
- description: "Dump complete Ruby call graph stack of entire #{Chef::Dist::PRODUCT} run (expert only)",
+ description: "Dump complete Ruby call graph stack of entire #{Chef::Dist::PRODUCT} run (expert only).",
boolean: true,
default: false
@@ -79,24 +79,24 @@ class Chef::Application::Client < Chef::Application
long: "--[no-]color",
boolean: true,
default: true,
- description: "Use colored output, defaults to enabled"
+ description: "Use colored output, defaults to enabled."
option :log_level,
short: "-l LEVEL",
long: "--log_level LEVEL",
- description: "Set the log level (auto, trace, debug, info, warn, error, fatal)",
+ description: "Set the log level (auto, trace, debug, info, warn, error, fatal).",
proc: lambda { |l| l.to_sym }
option :log_location,
short: "-L LOGLOCATION",
long: "--logfile LOGLOCATION",
- description: "Set the log file location, defaults to STDOUT - recommended for daemonizing",
+ description: "Set the log file location, defaults to STDOUT - recommended for daemonizing.",
proc: nil
option :help,
short: "-h",
long: "--help",
- description: "Show this message",
+ description: "Show this help message.",
on: :tail,
boolean: true,
show_options: true,
@@ -105,20 +105,20 @@ class Chef::Application::Client < Chef::Application
option :user,
short: "-u USER",
long: "--user USER",
- description: "User to set privilege to",
+ description: "User to set privilege to.",
proc: nil
option :group,
short: "-g GROUP",
long: "--group GROUP",
- description: "Group to set privilege to",
+ description: "Group to set privilege to.",
proc: nil
unless Chef::Platform.windows?
option :daemonize,
short: "-d [WAIT]",
long: "--daemonize [WAIT]",
- description: "Daemonize the process. Accepts an optional integer which is the " \
+ description: "Daemonize the process. Accepts an optional integer which is the " \
"number of seconds to wait before the first daemonized run.",
proc: lambda { |wait| wait =~ /^\d+$/ ? wait.to_i : true }
end
@@ -126,75 +126,75 @@ class Chef::Application::Client < Chef::Application
option :pid_file,
short: "-P PID_FILE",
long: "--pid PIDFILE",
- description: "Set the PID file location, for the #{Chef::Dist::CLIENT} daemon process. Defaults to /tmp/chef-client.pid",
+ description: "Set the PID file location, for the #{Chef::Dist::CLIENT} daemon process. Defaults to /tmp/chef-client.pid.",
proc: nil
option :lockfile,
long: "--lockfile LOCKFILE",
- description: "Set the lockfile location. Prevents multiple client processes from converging at the same time",
+ description: "Set the lockfile location. Prevents multiple client processes from converging at the same time.",
proc: nil
option :interval,
short: "-i SECONDS",
long: "--interval SECONDS",
- description: "Run #{Chef::Dist::CLIENT} periodically, in seconds",
+ description: "Run #{Chef::Dist::CLIENT} periodically, in seconds.",
proc: lambda { |s| s.to_i }
option :once,
long: "--once",
- description: "Cancel any interval or splay options, run #{Chef::Dist::CLIENT} once and exit",
+ description: "Cancel any interval or splay options, run #{Chef::Dist::CLIENT} once and exit.",
boolean: true
option :json_attribs,
short: "-j JSON_ATTRIBS",
long: "--json-attributes JSON_ATTRIBS",
- description: "Load attributes from a JSON file or URL",
+ description: "Load attributes from a JSON file or URL.",
proc: nil
option :node_name,
short: "-N NODE_NAME",
long: "--node-name NODE_NAME",
- description: "The node name for this client",
+ description: "The node name for this client.",
proc: nil
option :splay,
short: "-s SECONDS",
long: "--splay SECONDS",
- description: "The splay time for running at intervals, in seconds",
+ description: "The splay time for running at intervals, in seconds.",
proc: lambda { |s| s.to_i }
option :chef_server_url,
short: "-S CHEFSERVERURL",
long: "--server CHEFSERVERURL",
- description: "The #{Chef::Dist::PRODUCT} server URL",
+ description: "The #{Chef::Dist::SERVER_PRODUCT} URL.",
proc: nil
option :validation_key,
short: "-K KEY_FILE",
long: "--validation_key KEY_FILE",
- description: "Set the validation key file location, used for registering new clients",
+ description: "Set the validation key file location, used for registering new clients.",
proc: nil
option :client_key,
short: "-k KEY_FILE",
long: "--client_key KEY_FILE",
- description: "Set the client key file location",
+ description: "Set the client key file location.",
proc: nil
option :named_run_list,
short: "-n NAMED_RUN_LIST",
long: "--named-run-list NAMED_RUN_LIST",
- description: "Use a policyfile's named run list instead of the default run list"
+ description: "Use a policyfile's named run list instead of the default run list."
option :environment,
short: "-E ENVIRONMENT",
long: "--environment ENVIRONMENT",
- description: "Set the #{Chef::Dist::PRODUCT} Environment on the node"
+ description: "Set the #{Chef::Dist::PRODUCT} environment on the node."
option :version,
short: "-v",
long: "--version",
- description: "Show #{Chef::Dist::PRODUCT} version",
+ description: "Show #{Chef::Dist::PRODUCT} version.",
boolean: true,
proc: lambda { |v| puts "#{Chef::Dist::PRODUCT}: #{::Chef::VERSION}" },
exit: 0
@@ -202,7 +202,7 @@ class Chef::Application::Client < Chef::Application
option :override_runlist,
short: "-o RunlistItem,RunlistItem...",
long: "--override-runlist RunlistItem,RunlistItem...",
- description: "Replace current run list with specified items for a single run",
+ description: "Replace current run list with specified items for a single run.",
proc: lambda { |items|
items = items.split(",")
items.compact.map do |item|
@@ -213,7 +213,7 @@ class Chef::Application::Client < Chef::Application
option :runlist,
short: "-r RunlistItem,RunlistItem...",
long: "--runlist RunlistItem,RunlistItem...",
- description: "Permanently replace current run list with specified items",
+ description: "Permanently replace current run list with specified items.",
proc: lambda { |items|
items = items.split(",")
items.compact.map do |item|
@@ -223,13 +223,13 @@ class Chef::Application::Client < Chef::Application
option :why_run,
short: "-W",
long: "--why-run",
- description: "Enable whyrun mode",
+ description: "Enable whyrun mode.",
boolean: true
option :client_fork,
short: "-f",
long: "--[no-]fork",
- description: "Fork client"
+ description: "Fork #{Chef::Dist::CLIENT} process."
option :recipe_url,
long: "--recipe-url=RECIPE_URL",
@@ -238,26 +238,26 @@ class Chef::Application::Client < Chef::Application
option :enable_reporting,
short: "-R",
long: "--enable-reporting",
- description: "Enable reporting data collection for #{Chef::Dist::PRODUCT} runs",
+ description: "Enable reporting data collection for #{Chef::Dist::PRODUCT} runs.",
boolean: true
option :local_mode,
short: "-z",
long: "--local-mode",
- description: "Point #{Chef::Dist::CLIENT} at local repository",
+ description: "Point #{Chef::Dist::CLIENT} at local repository.",
boolean: true
option :chef_zero_host,
long: "--chef-zero-host HOST",
- description: "Host to start chef-zero on"
+ description: "Host to start chef-zero on."
option :chef_zero_port,
long: "--chef-zero-port PORT",
- description: "Port (or port range) to start chef-zero on. Port ranges like 1000,1010 or 8889-9999 will try all given ports until one works."
+ description: "Port (or port range) to start chef-zero on. Port ranges like 1000,1010 or 8889-9999 will try all given ports until one works."
option :disable_config,
long: "--disable-config",
- description: "Refuse to load a config file and use defaults. This is for development and not a stable API",
+ description: "Refuse to load a config file and use defaults. This is for development and not a stable API.",
boolean: true
option :run_lock_timeout,
@@ -269,33 +269,33 @@ class Chef::Application::Client < Chef::Application
option :fatal_windows_admin_check,
short: "-A",
long: "--fatal-windows-admin-check",
- description: "Fail the run when #{Chef::Dist::CLIENT} doesn't have administrator privileges on Windows",
+ description: "Fail the run when #{Chef::Dist::CLIENT} doesn't have administrator privileges on Windows.",
boolean: true
end
option :minimal_ohai,
long: "--minimal-ohai",
- description: "Only run the bare minimum ohai plugins #{Chef::Dist::CLIENT} needs to function",
+ description: "Only run the bare minimum Ohai plugins #{Chef::Dist::PRODUCT} needs to function.",
boolean: true
option :listen,
long: "--[no-]listen",
- description: "Whether a local mode (-z) server binds to a port",
+ description: "Whether a local mode (-z) server binds to a port.",
boolean: false
option :fips,
long: "--[no-]fips",
- description: "Enable fips mode",
+ description: "Enable FIPS mode.",
boolean: true
option :delete_entire_chef_repo,
long: "--delete-entire-chef-repo",
- description: "DANGEROUS: does what it says, only useful with --recipe-url",
+ description: "DANGEROUS: does what it says, only useful with --recipe-url.",
boolean: true
option :skip_cookbook_sync,
long: "--[no-]skip-cookbook-sync",
- description: "Use cached cookbooks without overwriting local differences from the server",
+ description: "Use cached cookbooks without overwriting local differences from the #{Chef::Dist::SERVER_PRODUCT}.",
boolean: false
IMMEDIATE_RUN_SIGNAL = "1".freeze
@@ -504,7 +504,7 @@ class Chef::Application::Client < Chef::Application
end
def unforked_interval_error_message
- "Unforked #{Chef::Dist::CLIENT} interval runs are disabled in #{Chef::Dist::PRODUCT} 12." +
+ "Unforked #{Chef::Dist::CLIENT} interval runs are disabled by default." +
"\nConfiguration settings:" +
("\n interval = #{Chef::Config[:interval]} seconds" if Chef::Config[:interval]).to_s +
"\nEnable #{Chef::Dist::CLIENT} interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options."
diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb
index 6c9618fcb4..15a5eaed70 100644
--- a/lib/chef/application/exit_code.rb
+++ b/lib/chef/application/exit_code.rb
@@ -22,6 +22,7 @@ class Chef
# These are the exit codes defined in Chef RFC 062
# https://github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md
class ExitCode
+ require "chef/dist"
# -1 is defined as DEPRECATED_FAILURE in RFC 062, so it is
# not enumerated in an active constant.
@@ -143,10 +144,10 @@ class Chef
end
def non_standard_exit_code_warning(exit_code)
- "Chef attempted to exit with a non-standard exit code of #{exit_code}." \
- " Chef RFC 062 (https://github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md) defines the" \
- " exit codes that should be used with Chef. Chef::Application::ExitCode defines valid exit codes" \
- " Non-standard exit codes are redefined as GENERIC_FAILURE."
+ "#{Chef::Dist::CLIENT} attempted to exit with a non-standard exit code of #{exit_code}." \
+ " The Chef-Client Exit Codes design document (https://github.com/chef/chef-rfc/blob/master/rfc062-exit-status.md)" \
+ " defines the exit codes that should be used with Chef. Chef::Application::ExitCode defines" \
+ " valid exit codes Non-standard exit codes are redefined as GENERIC_FAILURE."
end
end
diff --git a/lib/chef/application/knife.rb b/lib/chef/application/knife.rb
index bdf1b7e7a7..accbb4e03a 100644
--- a/lib/chef/application/knife.rb
+++ b/lib/chef/application/knife.rb
@@ -31,12 +31,12 @@ class Chef::Application::Knife < Chef::Application
option :config_file,
short: "-c CONFIG",
long: "--config CONFIG",
- description: "The configuration file to use",
+ description: "The configuration file to use.",
proc: lambda { |path| File.expand_path(path, Dir.pwd) }
option :config_option,
long: "--config-option OPTION=VALUE",
- description: "Override a single configuration option",
+ description: "Override a single configuration option.",
proc: lambda { |option, existing|
(existing ||= []) << option
existing
@@ -46,7 +46,7 @@ class Chef::Application::Knife < Chef::Application
option :verbosity,
short: "-V",
long: "--verbose",
- description: "More verbose output. Use twice for max verbosity",
+ description: "More verbose output. Use twice for max verbosity.",
proc: Proc.new { verbosity_level += 1 },
default: 0
@@ -54,104 +54,104 @@ class Chef::Application::Knife < Chef::Application
long: "--[no-]color",
boolean: true,
default: true,
- description: "Use colored output, defaults to enabled"
+ description: "Use colored output, defaults to enabled."
option :environment,
short: "-E ENVIRONMENT",
long: "--environment ENVIRONMENT",
- description: "Set the #{Chef::Dist::PRODUCT} environment (except for in searches, where this will be flagrantly ignored)"
+ description: "Set the #{Chef::Dist::PRODUCT} environment (except for in searches, where this will be flagrantly ignored)."
option :editor,
short: "-e EDITOR",
long: "--editor EDITOR",
- description: "Set the editor to use for interactive commands",
+ description: "Set the editor to use for interactive commands.",
default: ENV["EDITOR"]
option :disable_editing,
short: "-d",
long: "--disable-editing",
- description: "Do not open EDITOR, just accept the data as is",
+ description: "Do not open EDITOR, just accept the data as is.",
boolean: true,
default: false
option :help,
short: "-h",
long: "--help",
- description: "Show this message",
+ description: "Show this help message.",
on: :tail,
boolean: true
option :node_name,
short: "-u USER",
long: "--user USER",
- description: "API Client Username"
+ description: "#{Chef::Dist::SERVER_PRODUCT} API client username."
option :client_key,
short: "-k KEY",
long: "--key KEY",
- description: "API Client Key",
+ description: "#{Chef::Dist::SERVER_PRODUCT} API client key.",
proc: lambda { |path| File.expand_path(path, Dir.pwd) }
option :chef_server_url,
short: "-s URL",
long: "--server-url URL",
- description: "#{Chef::Dist::PRODUCT} Server URL"
+ description: "#{Chef::Dist::SERVER_PRODUCT} URL."
option :yes,
short: "-y",
long: "--yes",
- description: "Say yes to all prompts for confirmation"
+ description: "Say yes to all prompts for confirmation."
option :defaults,
long: "--defaults",
- description: "Accept default values for all questions"
+ description: "Accept default values for all questions."
option :print_after,
long: "--print-after",
- description: "Show the data after a destructive operation"
+ description: "Show the data after a destructive operation."
option :format,
short: "-F FORMAT",
long: "--format FORMAT",
- description: "Which format to use for output",
+ description: "Which format to use for output.",
default: "summary"
option :local_mode,
short: "-z",
long: "--local-mode",
- description: "Point knife commands at local repository instead of server",
+ description: "Point knife commands at local repository instead of #{Chef::Dist::SERVER_PRODUCT}.",
boolean: true
option :chef_zero_host,
long: "--chef-zero-host HOST",
- description: "Host to start chef-zero on"
+ description: "Host to start chef-zero on."
option :chef_zero_port,
long: "--chef-zero-port PORT",
- description: "Port (or port range) to start chef-zero on. Port ranges like 1000,1010 or 8889-9999 will try all given ports until one works."
+ description: "Port (or port range) to start chef-zero on. Port ranges like 1000,1010 or 8889-9999 will try all given ports until one works."
option :listen,
long: "--[no-]listen",
- description: "Whether a local mode (-z) server binds to a port",
+ description: "Whether a local mode (-z) server binds to a port.",
boolean: false
option :version,
short: "-v",
long: "--version",
- description: "Show #{Chef::Dist::PRODUCT} version",
+ description: "Show #{Chef::Dist::PRODUCT} version.",
boolean: true,
proc: lambda { |v| puts "#{Chef::Dist::PRODUCT}: #{::Chef::VERSION}" },
exit: 0
option :fips,
long: "--[no-]fips",
- description: "Enable fips mode",
+ description: "Enable FIPS mode.",
boolean: true,
default: nil
option :profile,
long: "--profile PROFILE",
- description: "The credentials profile to select"
+ description: "The credentials profile to select."
# Run knife
def run
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 5655b8cdfd..72db3e89d9 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -39,11 +39,11 @@ class Chef::Application::Solo < Chef::Application
short: "-c CONFIG",
long: "--config CONFIG",
default: Chef::Config.platform_specific_path("/etc/chef/solo.rb"),
- description: "The configuration file to use"
+ description: "The configuration file to use."
option :config_option,
long: "--config-option OPTION=VALUE",
- description: "Override a single configuration option",
+ description: "Override a single configuration option.",
proc: lambda { |option, existing|
(existing ||= []) << option
existing
@@ -52,24 +52,24 @@ class Chef::Application::Solo < Chef::Application
option :formatter,
short: "-F FORMATTER",
long: "--format FORMATTER",
- description: "output format to use",
+ description: "The output format to use.",
proc: lambda { |format| Chef::Config.add_formatter(format) }
option :force_logger,
long: "--force-logger",
- description: "Use logger output instead of formatter output",
+ description: "Use logger output instead of formatter output.",
boolean: true,
default: false
option :force_formatter,
long: "--force-formatter",
- description: "Use formatter output instead of logger output",
+ description: "Use formatter output instead of logger output.",
boolean: true,
default: false
option :profile_ruby,
long: "--[no-]profile-ruby",
- description: "Dump complete Ruby call graph stack of entire #{Chef::Dist::PRODUCT} run (expert only)",
+ description: "Dump complete Ruby call graph stack of entire #{Chef::Dist::PRODUCT} run (expert only).",
boolean: true,
default: false
@@ -77,24 +77,24 @@ class Chef::Application::Solo < Chef::Application
long: "--[no-]color",
boolean: true,
default: true,
- description: "Use colored output, defaults to enabled"
+ description: "Use colored output, defaults to enabled."
option :log_level,
short: "-l LEVEL",
long: "--log_level LEVEL",
- description: "Set the log level (auto, trace, debug, info, warn, error, fatal)",
+ description: "Set the log level (auto, trace, debug, info, warn, error, fatal).",
proc: lambda { |l| l.to_sym }
option :log_location,
short: "-L LOGLOCATION",
long: "--logfile LOGLOCATION",
- description: "Set the log file location, defaults to STDOUT - recommended for daemonizing",
+ description: "Set the log file location, defaults to STDOUT - recommended for daemonizing.",
proc: nil
option :help,
short: "-h",
long: "--help",
- description: "Show this message",
+ description: "Show this help message.",
on: :tail,
boolean: true,
show_options: true,
@@ -103,50 +103,50 @@ class Chef::Application::Solo < Chef::Application
option :user,
short: "-u USER",
long: "--user USER",
- description: "User to set privilege to",
+ description: "User to set privilege to.",
proc: nil
option :group,
short: "-g GROUP",
long: "--group GROUP",
- description: "Group to set privilege to",
+ description: "Group to set privilege to.",
proc: nil
unless Chef::Platform.windows?
option :daemonize,
short: "-d",
long: "--daemonize",
- description: "Daemonize the process",
+ description: "Daemonize the process.",
proc: lambda { |p| true }
end
option :lockfile,
long: "--lockfile LOCKFILE",
- description: "Set the lockfile location. Prevents multiple solo processes from converging at the same time",
+ description: "Set the lockfile location. Prevents multiple solo processes from converging at the same time.",
proc: nil
option :interval,
short: "-i SECONDS",
long: "--interval SECONDS",
- description: "Run #{Chef::Dist::CLIENT} periodically, in seconds",
+ description: "Run #{Chef::Dist::CLIENT} periodically, in seconds.",
proc: lambda { |s| s.to_i }
option :json_attribs,
short: "-j JSON_ATTRIBS",
long: "--json-attributes JSON_ATTRIBS",
- description: "Load attributes from a JSON file or URL",
+ description: "Load attributes from a JSON file or URL.",
proc: nil
option :node_name,
short: "-N NODE_NAME",
long: "--node-name NODE_NAME",
- description: "The node name for this client",
+ description: "The node name for this client.",
proc: nil
option :splay,
short: "-s SECONDS",
long: "--splay SECONDS",
- description: "The splay time for running at intervals, in seconds",
+ description: "The splay time for running at intervals, in seconds.",
proc: lambda { |s| s.to_i }
option :recipe_url,
@@ -157,7 +157,7 @@ class Chef::Application::Solo < Chef::Application
option :version,
short: "-v",
long: "--version",
- description: "Show #{Chef::Dist::EXEC} version",
+ description: "Show #{Chef::Dist::PRODUCT} version.",
boolean: true,
proc: lambda { |v| puts "#{Chef::Dist::PRODUCT}: #{::Chef::VERSION}" },
exit: 0
@@ -165,7 +165,7 @@ class Chef::Application::Solo < Chef::Application
option :override_runlist,
short: "-o RunlistItem,RunlistItem...",
long: "--override-runlist RunlistItem,RunlistItem...",
- description: "Replace current run list with specified items for a single run",
+ description: "Replace current run list with specified items for a single run.",
proc: lambda { |items|
items = items.split(",")
items.compact.map do |item|
@@ -176,23 +176,23 @@ class Chef::Application::Solo < Chef::Application
option :client_fork,
short: "-f",
long: "--[no-]fork",
- description: "Fork client"
+ description: "Fork client."
option :why_run,
short: "-W",
long: "--why-run",
- description: "Enable whyrun mode",
+ description: "Enable whyrun mode.",
boolean: true
option :ez,
long: "--ez",
- description: "A memorial for Ezra Zygmuntowicz",
+ description: "A memorial for Ezra Zygmuntowicz.",
boolean: true
option :environment,
short: "-E ENVIRONMENT",
long: "--environment ENVIRONMENT",
- description: "Set the #{Chef::Dist::PRODUCT} Environment on the node"
+ description: "Set the #{Chef::Dist::PRODUCT} environment on the node."
option :run_lock_timeout,
long: "--run-lock-timeout SECONDS",
@@ -201,17 +201,17 @@ class Chef::Application::Solo < Chef::Application
option :minimal_ohai,
long: "--minimal-ohai",
- description: "Only run the bare minimum ohai plugins #{Chef::Dist::PRODUCT} needs to function",
+ description: "Only run the bare minimum Ohai plugins #{Chef::Dist::PRODUCT} needs to function.",
boolean: true
option :delete_entire_chef_repo,
long: "--delete-entire-chef-repo",
- description: "DANGEROUS: does what it says, only useful with --recipe-url",
+ description: "DANGEROUS: does what it says, only useful with --recipe-url.",
boolean: true
option :solo_legacy_mode,
long: "--legacy-mode",
- description: "Run chef-solo in legacy mode",
+ description: "Run chef-solo in legacy mode.",
boolean: true
attr_reader :chef_client_json
@@ -366,7 +366,7 @@ class Chef::Application::Solo < Chef::Application
end
def unforked_interval_error_message
- "Unforked #{Chef::Dist::CLIENT} interval runs are disabled in #{Chef::Dist::PRODUCT} 12." +
+ "Unforked #{Chef::Dist::CLIENT} interval runs are disabled bvy default." +
"\nConfiguration settings:" +
("\n interval = #{Chef::Config[:interval]} seconds" if Chef::Config[:interval]).to_s +
"\nEnable #{Chef::Dist::CLIENT} interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options."