.. _junos_get_config: junos_get_config - Retrieve configuration of device +++++++++++++++++++++++++++++++++++++++++++++++++++ :Author: Rick Sherman, Juniper Networks .. contents:: :local: :depth: 1 Synopsis -------- .. versionadded:: 1.2.0 Retrieve the configuration of a device running Junos and save it to a file. **Note** unicode chars will be converted to '??' as also done in PyEZ Options ------- .. raw:: html
parameter | required | default | choices | comments |
---|---|---|---|---|
dest | yes | None | Path to the local server directory where configuration will be saved. | |
filter | no | None | Defines heircachy of configuration to retrieve. If omitted entire configuration is retrieved. Format is slash notation ex groups/routeinst/routing-instances/ISP-1 | |
format | no | text |
|
text - configuration saved as text (curly-brace) formatxml - configuration 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. | |
options | no | None | Additional options to pass to get_config. Refer to jnpr.junos.rpcmeta.get_config for details. | |
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** | |
user | no | $USER | Login username |