New in version 2.5.
Parameter |
Choices/Defaults |
Comments |
---|---|---|
commands
required |
|
The commands or ordered set of commands that should be run against the remote device. The output of the command is returned to the playbook. If the
wait_for argument is provided, the module is not returned until the condition is met or the number of retries is exceeded. |
interval
|
Default:
yes
|
The number of seconds to wait between
retries of the command. |
match
|
|
Used in conjunction with
wait_for to create match policy. If set to all , then all conditions in wait_for must be met. If set to any , then only one condition must match. |
retries
|
Default:
10
|
Number of times a command should be tried before it is considered failed. The command is run on the target device and evaluated against the
wait_for conditionals. |
wait_for
|
|
Causes the task to wait for a specific condition to be met before moving forward. If the condition is not met before the specified number of retries is exceeded, the task will fail.
|
Note
tasks:
- name: Reboot the device
edgeos_command:
commands: reboot now
- name: Show the configuration for eth0 and eth1
edgeos_command:
commands: show interfaces ethernet {{ item }}
loop:
- eth0
- eth1
Common return values are documented here, the following are the fields unique to this module:
Key |
Returned |
Description |
---|---|---|
stdout
list
|
always apart from low level errors (such as action plugin) |
The set of responses from the commands
Sample:
['...', '...']
|
stdout_lines
list
|
always |
The value of stdout split into a list
Sample:
[['...', '...'], ['...'], ['...']]
|
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Hint
If you notice any issues in this documentation you can edit this document to improve it.