Class: Ansible::Ruby::Modules::Junos_command
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Junos_command
- Defined in:
- lib/ansible/ruby/modules/generated/core/network/junos/junos_command.rb
Overview
Network devices running the Junos operating system provide a command driven interface both over CLI and RPC. This module provides an interface to execute commands using these functions and return the results to the Ansible playbook. In addition, the M(junos_command) module can specify a set of conditionals to be evaluated against the returned output, only returning control to the playbook once the entire set of conditionals has been met.
Instance Method Summary collapse
-
#commands ⇒ Array<String>, ...
An ordered set of CLI commands to be executed on the remote device.
-
#format ⇒ :xml, ...
Configures the encoding scheme to use when serializing output from the device.
-
#interval ⇒ Integer?
Configures the interval in seconds to wait between retries of the command.
-
#retries ⇒ Integer?
Specifies the number of retries a command should by tried before it is considered failed.
-
#rpcs ⇒ Array<String>, ...
The C(rpcs) argument accepts a list of RPCs to be executed over a netconf session and the results from the RPC execution is return to the playbook via the modules results dictionary.
-
#waitfor ⇒ Array<String>, ...
Specifies what to evaluate from the output of the command and what conditionals to apply.
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
#commands ⇒ Array<String>, ...
Returns An ordered set of CLI commands to be executed on the remote device. The output from the commands is then returned to the playbook in the task results.
11 |
# File 'lib/ansible/ruby/modules/generated/core/network/junos/junos_command.rb', line 11 attribute :commands |
#format ⇒ :xml, ...
Returns Configures the encoding scheme to use when serializing output from the device. This handles how to properly understand the output and apply the conditionals path to the result set.
31 |
# File 'lib/ansible/ruby/modules/generated/core/network/junos/junos_command.rb', line 31 attribute :format |
#interval ⇒ Integer?
Returns Configures the interval in seconds to wait between retries of the command. If the command does not pass the specified conditional, the interval indicates how to long to wait before trying the command again.
27 |
# File 'lib/ansible/ruby/modules/generated/core/network/junos/junos_command.rb', line 27 attribute :interval |
#retries ⇒ Integer?
Returns Specifies the number of retries a command should by tried before it is considered failed. The command is run on the target device every retry and evaluated against the waitfor conditionals.
23 |
# File 'lib/ansible/ruby/modules/generated/core/network/junos/junos_command.rb', line 23 attribute :retries |
#rpcs ⇒ Array<String>, ...
Returns The C(rpcs) argument accepts a list of RPCs to be executed over a netconf session and the results from the RPC execution is return to the playbook via the modules results dictionary.
15 |
# File 'lib/ansible/ruby/modules/generated/core/network/junos/junos_command.rb', line 15 attribute :rpcs |
#waitfor ⇒ Array<String>, ...
Returns Specifies what to evaluate from the output of the command and what conditionals to apply. This argument will cause the task to wait for a particular conditional or set of considitonals to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples.
19 |
# File 'lib/ansible/ruby/modules/generated/core/network/junos/junos_command.rb', line 19 attribute :waitfor |