lib/bolt/bolt_option_parser.rb in bolt-1.42.0 vs lib/bolt/bolt_option_parser.rb in bolt-1.43.0

- old
+ new

@@ -6,11 +6,11 @@ module Bolt class BoltOptionParser < OptionParser OPTIONS = { inventory: %w[nodes targets query rerun description], authentication: %w[user password password-prompt private-key host-key-check ssl ssl-verify], - escalation: %w[run-as sudo-password sudo-password-prompt], + escalation: %w[run-as sudo-password sudo-password-prompt sudo-executable], run_context: %w[concurrency inventoryfile save-rerun], global_config_setters: %w[modulepath boltdir configfile], transports: %w[transport connect-timeout tty], display: %w[format color verbose trace], global: %w[help version debug] }.freeze @@ -700,9 +700,13 @@ end define('--sudo-password-prompt', 'Prompt for user to input escalation password') do |_password| STDERR.print "Please enter your privilege escalation password: " @options[:'sudo-password'] = STDIN.noecho(&:gets).chomp STDERR.puts + end + define('--sudo-executable EXEC', "Specify an executable for running as another user.", + "This option is experimental.") do |exec| + @options[:'sudo-executable'] = exec end separator "\nRUN CONTEXT OPTIONS" define('-c', '--concurrency CONCURRENCY', Integer, 'Maximum number of simultaneous connections (default: 100)') do |concurrency|