icx_command – Run arbitrary commands on remote Ruckus ICX 7000 series switches¶
New in version 2.9.
- 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.
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 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 contains ICX - result 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
Common return values are documented here, the following are the fields unique to this module: