add sudo_command option

This commit is contained in:
Jeremy J. Miller 2016-05-15 07:22:18 -04:00
parent 7c9706bbd7
commit 9795879628
3 changed files with 6 additions and 1 deletions

View file

@ -190,7 +190,7 @@ inspec exec test.rb -t winrm://Administrator@windowshost --password 'your-passwo
inspec exec test.rb -t docker://container_id
# run with sudo
inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...]
inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...] [--sudo_command ...]
```
### detect

View file

@ -41,6 +41,9 @@ The following options may be used with any of the InSpec CLI subcommands:
``--sudo_password``
The sudo password, if required.
``--sudo_command``
Altnerate sudo command, if required.
``-t``, ``--target``
The URI for the target of a remote scan, preceded by the target's backend. For example: ``backend://user:pass@host:port``, where ``backend`` is one of ``docker``, ``local``, ``ssh``, or ``winrm``.

View file

@ -29,6 +29,8 @@ module Inspec
desc: 'Specify a sudo password, if it is required.'
option :sudo_options, type: :string,
desc: 'Additional sudo options for a remote scan.'
option :sudo_command, type: :string,
desc: 'Altnerate command for sudo.'
option :ssl, type: :boolean,
desc: 'Use SSL for transport layer encryption (WinRM).'
option :self_signed, type: :boolean,