.. _junos_install_config: junos_install_config - Load a configuration file or snippet onto a device running Junos OS. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :Author: Jeremy Schulman, Juniper Networks .. contents:: :local: :depth: 1 Synopsis -------- .. versionadded:: 1.0.0 Load a complete Junos OS configuration (overwrite) or merge a configuration snippet onto a device running Junos OS and commit it. The default behavior is to perform a **load merge** operation (overwrite='no'). This module performs an atomic lock/edit/unlock. If the process fails at any step, then all configuration changes are discarded. You can load the configuration using either NETCONF or the CONSOLE port. Specify the *console* option to use the CONSOLE port. You provide the configuration data in a file. Supported formats when using NETCONF include ASCII text, Junos XML elements, and Junos OS **set** commands. Configurations performed through the console must only use ASCII text formatting. Options ------- .. raw:: html
parameter | required | default | choices | comments |
---|---|---|---|---|
comment | no | None | Provide a comment to the commit of the configuration | |
confirm | no | None | Provide a confirm in minutes to the commit of the configuration | |
console | no | None | Port configuration, per the netconify utility | |
diffs_file | no | None | Path to the file where any diffs will be written | |
file | yes | Path to the file containing the Junos OS configuration data. If the file has a *.conf extension, the content is treated as text format. If the file has a *.xml extension, the content is treated as XML format. If the file has a *.set extension, the content is treated as Junos OS set commands. |
||
host | yes | Set to {{ inventory_hostname }} | ||
logfile | no | None | Path on the local server where the progress status is logged for debugging purposes | |
overwrite | no |
|
Specify whether the configuration file completely replaces the existing configuration. | |
passwd | no | assumes ssh-key active | Login password | |
port | no | 830 | TCP port number to use when connecting to the device | |
replace | no |
|
Specify whether the configuration file uses "replace:" statements. (NETCONF only) NOT compatible with set format | |
savedir | no | None | Path to the local server directory where device facts and inventory files will be stored. This option is used only with the console option. Refer to the netconify utility for details. | |
timeout | no | 0 | Extend the NETCONF RPC timeout beyond the default value of 30 seconds. Set this value to accommodate configuration changes (commits) that might take longer than the default timeout interval. | |
user | no | $USER | Login username |