.. _cisco.ios.ios_cliconf: ************* cisco.ios.ios ************* **Use ios cliconf to run command on Cisco IOS platform** Version added: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - This ios plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco IOS network devices. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Configuration Comments
commit_confirm_immediate
boolean
Default:
"no"
env:ANSIBLE_IOS_COMMIT_CONFIRM_IMMEDIATE
var: ansible_ios_commit_confirm_immediate
Enable or disable commit confirm mode.
Confirms the configuration pushed after a custom/ default timeout.(default 1 minute).
For custom timeout configuration set commit_confirm_timeout value.
On commit_confirm_immediate default value for commit_confirm_timeout is considered 1 minute when variable in not explicitly declared.
commit_confirm_timeout
integer
env:ANSIBLE_IOS_COMMIT_CONFIRM_TIMEOUT
var: ansible_ios_commit_confirm_timeout
Commits the configuration on a trial basis for the time specified in minutes.
Using commit_confirm_timeout without specifying commit_confirm_immediate would need an explicit configure confirm using the ios_command module to confirm/commit the changes made.
Refer to example for a use case demonstration.
config_commands
list / elements=string
added in 2.0.0
Default:
[]
var: ansible_ios_config_commands
Specifies a list of commands that can make configuration changes to the target device.
When `ansible_network_single_user_mode` is enabled, if a command sent to the device is present in this list, the existing cache is invalidated.

Examples -------- .. code-block:: yaml # NOTE - IOS waits for a `configure confirm` when the configure terminal # command executed is `configure terminal revert timer ` within the timeout # period for the configuration to commit successfully, else a rollback # happens. # Use commit confirm with timeout and confirm the commit explicitly - name: Example commit confirmed vars: ansible_ios_commit_confirm_timeout: 1 tasks: - name: "Commit confirmed with timeout" cisco.ios.ios_hostname: state: merged config: hostname: R1 - name: "Confirm the Commit" cisco.ios.ios_command: commands: - configure confirm # Commands fired # - configure terminal revert timer 1 (cliconf specific) # - hostname R1 (from hostname resource module) # - configure confirm (from ios_command module) # Use commit confirm with timeout and confirm the commit via cliconf - name: Example commit confirmed vars: ansible_ios_commit_confirm_immediate: True ansible_ios_commit_confirm_timeout: 3 tasks: - name: "Commit confirmed with timeout" cisco.ios.ios_hostname: state: merged config: hostname: R1 # Commands fired # - configure terminal revert timer 3 (cliconf specific) # - hostname R1 (from hostname resource module) # - configure confirm (cliconf specific) # Use commit confirm via cliconf using default timeout - name: Example commit confirmed vars: ansible_ios_commit_confirm_immediate: True tasks: - name: "Commit confirmed with timeout" cisco.ios.ios_hostname: state: merged config: hostname: R1 # Commands fired # - configure terminal revert timer 1 (cliconf specific with default timeout) # - hostname R1 (from hostname resource module) # - configure confirm (cliconf specific) Status ------ Authors ~~~~~~~ - Ansible Networking Team (@ansible-network) .. hint:: Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.