Class: Ansible::Ruby::Modules::Cli_config

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

Overview

This module provides platform agnostic way of pushing text based configuration to network devices over network_cli connection plugin.

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

#commitSymbol?

Returns The C(commit) argument instructs the module to push the configuration to the device. This is mapped to module check mode.

Returns:

  • (Symbol, nil)

    The C(commit) argument instructs the module to push the configuration to the device. This is mapped to module check mode.



16
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 16

attribute :commit

#commit_commentString?

Returns The C(commit_comment) argument specifies a text string to be used when committing the configuration. If the C(commit) argument is set to False, this argument is silently ignored. This argument is only valid for the platforms that support commit operation with comment.

Returns:

  • (String, nil)

    The C(commit_comment) argument specifies a text string to be used when committing the configuration. If the C(commit) argument is set to False, this argument is silently ignored. This argument is only valid for the platforms that support commit operation with comment.



27
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 27

attribute :commit_comment

#configString?

Returns The config to be pushed to the network device. This argument is mutually exclusive with C(rollback) and either one of the option should be given as input. The config should have indentation that the device uses.

Returns:

  • (String, nil)

    The config to be pushed to the network device. This argument is mutually exclusive with C(rollback) and either one of the option should be given as input. The config should have indentation that the device uses.



12
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 12

attribute :config

#defaults:yes, ...

Returns The I(defaults) argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword.

Returns:

  • (:yes, :no, nil)

    The I(defaults) argument will influence how the running-config is collected from the device. When the value is set to true, the command used to collect the running-config is append with the all keyword. When the value is set to false, the command is issued without the all keyword.



31
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 31

attribute :defaults

#diff_ignore_linesObject?

Returns Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. Note that this parameter will be ignored if the platform has onbox diff support.

Returns:

  • (Object, nil)

    Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. Note that this parameter will be ignored if the platform has onbox diff support.



47
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 47

attribute :diff_ignore_lines

#diff_match:line, ...

Returns Instructs the module on the way to perform the matching of the set of commands against the current device config. If C(diff_match) is set to I(line), commands are matched line by line. If C(diff_match) is set to I(strict), command lines are matched with respect to position. If C(diff_match) is set to I(exact), command lines must be an equal match. Finally, if C(diff_match) is set to I(none), the module will not attempt to compare the source configuration with the running configuration on the remote device. Note that this parameter will be ignored if the platform has onbox diff support.

Returns:

  • (:line, :strict, :exact, :none, nil)

    Instructs the module on the way to perform the matching of the set of commands against the current device config. If C(diff_match) is set to I(line), commands are matched line by line. If C(diff_match) is set to I(strict), command lines are matched with respect to position. If C(diff_match) is set to I(exact), command lines must be an equal match. Finally, if C(diff_match) is set to I(none), the module will not attempt to compare the source configuration with the running configuration on the remote device. Note that this parameter will be ignored if the platform has onbox diff support.



43
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 43

attribute :diff_match

#diff_replace:line, ...

Returns Instructs the module on the way to perform the configuration on the device. If the C(diff_replace) argument is set to I(line) then the modified lines are pushed to the device in configuration mode. If the argument is set to I(block) then the entire command block is pushed to the device in configuration mode if any line is not correct. Note that this parameter will be ignored if the platform has onbox diff support.

Returns:

  • (:line, :block, :config, nil)

    Instructs the module on the way to perform the configuration on the device. If the C(diff_replace) argument is set to I(line) then the modified lines are pushed to the device in configuration mode. If the argument is set to I(block) then the entire command block is pushed to the device in configuration mode if any line is not correct. Note that this parameter will be ignored if the platform has onbox diff support.



39
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 39

attribute :diff_replace

#multiline_delimiterString?

Returns This argument is used when pushing a multiline configuration element to the device. It specifies the character to use as the delimiting character. This only applies to the configuration action.

Returns:

  • (String, nil)

    This argument is used when pushing a multiline configuration element to the device. It specifies the character to use as the delimiting character. This only applies to the configuration action.



35
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 35

attribute :multiline_delimiter

#replaceString?

Returns If the C(replace) argument is set to C(yes), it will replace the entire running-config of the device with the C(config) argument value. For NXOS devices, C(replace) argument takes path to the file on the device that will be used for replacing the entire running-config. Nexus 9K devices only support replace. Use I(net_put) or I(nxos_file_copy) module to copy the flat file to remote device and then use set the fullpath to this argument.

Returns:

  • (String, nil)

    If the C(replace) argument is set to C(yes), it will replace the entire running-config of the device with the C(config) argument value. For NXOS devices, C(replace) argument takes path to the file on the device that will be used for replacing the entire running-config. Nexus 9K devices only support replace. Use I(net_put) or I(nxos_file_copy) module to copy the flat file to remote device and then use set the fullpath to this argument.



20
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 20

attribute :replace

#rollbackObject?

Returns The C(rollback) argument instructs the module to rollback the current configuration to the identifier specified in the argument. If the specified rollback identifier does not exist on the remote device, the module will fail. To rollback to the most recent commit, set the C(rollback) argument to 0. This option is mutually exclusive with C(config).

Returns:

  • (Object, nil)

    The C(rollback) argument instructs the module to rollback the current configuration to the identifier specified in the argument. If the specified rollback identifier does not exist on the remote device, the module will fail. To rollback to the most recent commit, set the C(rollback) argument to 0. This option is mutually exclusive with C(config).



24
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_config.rb', line 24

attribute :rollback