community.network.icx_command – Run arbitrary commands on remote Ruckus ICX 7000 series switches¶
Note
This plugin is part of the community.network collection (version 2.1.1).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.icx_command
.
Synopsis¶
Sends arbitrary commands to an ICX 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.
Parameters¶
Examples¶
tasks:
- name: Run show version on remote devices
community.network.icx_command:
commands: show version
- name: Run show version and check to see if output contains ICX
community.network.icx_command:
commands: show version
wait_for: result[0] contains ICX
- name: Run multiple commands on remote nodes
community.network.icx_command:
commands:
- show version
- show interfaces
- name: Run multiple commands and evaluate the output
community.network.icx_command:
commands:
- show version
- show interfaces
wait_for:
- result[0] contains ICX
- result[1] contains GigabitEthernet1/1/1
- name: Run commands that require answering a prompt
community.network.icx_command:
commands:
- command: 'service password-encryption sha1'
prompt: 'Warning: Moving to higher password-encryption type,.*'
answer: 'y'
- name: Run commands that require answering multiple prompt
community.network.icx_command:
commands:
- command: 'username qqq password qqq'
prompt:
- 'User already exists. Do you want to modify:.*'
- 'To modify or remove user, enter current password:'
answer:
- 'y'
- 'qqq\
'
check_all: True
newline: False
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Ruckus Wireless (@Commscope)