Class: Ansible::Ruby::Modules::Cli_command
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Cli_command
- Defined in:
- lib/ansible/ruby/modules/generated/network/cli/cli_command.rb
Overview
Sends a command to a network device and returns the result read from the device.
Instance Method Summary collapse
-
#answer ⇒ Array<String>, ...
The answer to reply with if I(prompt) is matched.
-
#check_all ⇒ Symbol?
By default if any one of the prompts mentioned in C(prompt) option is matched it won’t check for other prompts.
-
#command ⇒ String
The command to send to the remote network device.
-
#prompt ⇒ Array<String>, ...
A single regex pattern or a sequence of patterns to evaluate the expected prompt from I(command).
-
#sendonly ⇒ Symbol?
The boolean value, that when set to true will send I(command) to the device but not wait for a result.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#answer ⇒ Array<String>, ...
Returns The answer to reply with if I(prompt) is matched. The value can be a single answer or a list of answer for multiple prompts. In case the command execution results in multiple prompts the sequence of the prompt and excepted answer should be in same order.
20 |
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 20 attribute :answer |
#check_all ⇒ Symbol?
Returns By default if any one of the prompts mentioned in C(prompt) option is matched it won’t check for other prompts. This boolean flag, that when set to I(True) will check for all the prompts mentioned in C(prompt) option in the given order. If the option is set to I(True) all the prompts should be received from remote host if not it will result in timeout.
28 |
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 28 attribute :check_all |
#command ⇒ String
Returns The command to send to the remote network device. The resulting output from the command is returned, unless I(sendonly) is set.
12 |
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 12 attribute :command |
#prompt ⇒ Array<String>, ...
Returns A single regex pattern or a sequence of patterns to evaluate the expected prompt from I(command).
16 |
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 16 attribute :prompt |
#sendonly ⇒ Symbol?
Returns The boolean value, that when set to true will send I(command) to the device but not wait for a result.
24 |
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 24 attribute :sendonly |