.. _junos_cli: junos_cli - Execute CLI on device and save the output locally +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :Author: Damien Garros, Juniper Networks .. contents:: :local: :depth: 1 Synopsis -------- .. versionadded:: 1.2.0 Execute CLI on device and save the output locally on a file Options ------- .. raw:: html
parameter | required | default | choices | comments |
---|---|---|---|---|
cli | yes | CLI command to execute on the host | ||
dest | no | None | Path to the local server directory where cli output will be saved. | |
format | no | text |
|
text - Cli output saved in text formatxml - Cli output saved as XML |
host | yes | Set to {{ inventory_hostname }} | ||
logfile | no | None | Path on the local server where the progress status is logged for debugging purposes | |
mode | no | None | mode of console connection (telnet/serial). If mode is not provided SSH connection is used. | |
passwd | no | assumes ssh-key active | Login password | |
port | no | 830 | port number to use when connecting to the device | |
ssh_private_key_file | no | None | This can be used if you need to provide a private key rather than loading the key into the ssh-key-ring/environment. if your ssh-key requires a password, then you must provide it via **passwd** | |
timeout | no | 0 | Set the NETCONF RPC timeout. Set this value to accommodate Cli commands that might take longer than the default timeout interval. Setting to 0 will use the PyEZ default (30 seconds). | |
user | no | $USER | Login username |