Class: Ansible::Ruby::Modules::Junos_command

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/network/junos/junos_command.rb

Overview

Sends an arbitrary set of commands to an JUNOS node and returns the results read from the device. This module includes an argument that will cause the module to wait for a specific condition before returning or timing out if the condition is not met.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#commandsArray<String>, ...

Returns The commands to send to the remote junos device over the configured provider. The resulting output from the command is returned. If the I(wait_for) argument is provided, the module is not returned until the condition is satisfied or the number of I(retries) has been exceeded.

Returns:

  • (Array<String>, String, nil)

    The commands to send to the remote junos device over the configured provider. The resulting output from the command is returned. If the I(wait_for) argument is provided, the module is not returned until the condition is satisfied or the number of I(retries) has been exceeded.



12
# File 'lib/ansible/ruby/modules/generated/network/junos/junos_command.rb', line 12

attribute :commands

#display:text, ...

Returns 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. For I(rpcs) argument default display is C(xml) and for I(commands) argument default display is C(text). Value C(set) is applicable only for fetching configuration from device.

Returns:

  • (:text, :json, :xml, :set, nil)

    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. For I(rpcs) argument default display is C(xml) and for I(commands) argument default display is C(text). Value C(set) is applicable only for fetching configuration from device.



36
# File 'lib/ansible/ruby/modules/generated/network/junos/junos_command.rb', line 36

attribute :display

#intervalInteger?

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.

Returns:

  • (Integer, nil)

    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.



32
# File 'lib/ansible/ruby/modules/generated/network/junos/junos_command.rb', line 32

attribute :interval

#match:any, ...

Returns The I(match) argument is used in conjunction with the I(wait_for) argument to specify the match policy. Valid values are C(all) or C(any). If the value is set to C(all) then all conditionals in the I(wait_for) must be satisfied. If the value is set to C(any) then only one of the values must be satisfied.

Returns:

  • (:any, :all, nil)

    The I(match) argument is used in conjunction with the I(wait_for) argument to specify the match policy. Valid values are C(all) or C(any). If the value is set to C(all) then all conditionals in the I(wait_for) must be satisfied. If the value is set to C(any) then only one of the values must be satisfied.



24
# File 'lib/ansible/ruby/modules/generated/network/junos/junos_command.rb', line 24

attribute :match

#retriesInteger?

Returns Specifies the number of retries a command should be tried before it is considered failed. The command is run on the target device every retry and evaluated against the I(wait_for) conditionals.

Returns:

  • (Integer, nil)

    Specifies the number of retries a command should be tried before it is considered failed. The command is run on the target device every retry and evaluated against the I(wait_for) conditionals.



28
# File 'lib/ansible/ruby/modules/generated/network/junos/junos_command.rb', line 28

attribute :retries

#rpcsString?

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.

Returns:

  • (String, nil)

    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.



16
# File 'lib/ansible/ruby/modules/generated/network/junos/junos_command.rb', line 16

attribute :rpcs

#wait_forArray<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 to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples.

Returns:

  • (Array<String>, String, nil)

    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 to be true before moving forward. If the conditional is not true by the configured retries, the task fails. See examples.



20
# File 'lib/ansible/ruby/modules/generated/network/junos/junos_command.rb', line 20

attribute :wait_for