community.network.edgeos_command – Run one or more commands on EdgeOS devices¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network.
To use it in a playbook, specify: community.network.edgeos_command.
Synopsis¶
This command module allows running one or more commands on a remote device running EdgeOS, such as the Ubiquiti EdgeRouter.
This module does not support running commands in configuration mode.
Certain
showcommands in EdgeOS produce many lines of output and use a custom pager that can cause this module to hang. If the value of the environment variableANSIBLE_EDGEOS_TERMINAL_LENGTHis not set, the default number of 10000 is used.This is a network module and requires
connection: network_cliin order to work properly.For more information please see the Network Guide.
Parameters¶
Notes¶
Note
Tested against EdgeOS 1.9.7
Running
show system boot-messages allwill cause the module to hang since EdgeOS is using a custom pager setting to display the output of that command.
Examples¶
tasks:
- name: Reboot the device
community.network.edgeos_command:
commands: reboot now
- name: Show the configuration for eth0 and eth1
community.network.edgeos_command:
commands: show interfaces ethernet {{ item }}
loop:
- eth0
- eth1
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Chad Norgan (@beardymcbeards)
Sam Doran (@samdoran)