icx_command – Run arbitrary commands on remote Ruckus ICX 7000 series switches¶
New in version 2.9.
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
icx_command:
commands: show version
- name: run show version and check to see if output contains ICX
icx_command:
commands: show version
wait_for: result[0] contains ICX
- name: run multiple commands on remote nodes
icx_command:
commands:
- show version
- show interfaces
- name: run multiple commands and evaluate the output
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
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
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:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Ruckus Wireless (@Commscope)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.