| Author: | Rick Sherman, Juniper Networks |
|---|
| 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 | |
| diffs_file | no | None | Path to the file where any diffs will be written | |
| 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 | |
| rollback | yes | None | The rollback id value [0-49] | |
| 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 | Extend the NETCONF RPC timeout beyond the default value of 30 seconds. Set this value to accommodate rollbacks that might take longer than the default timeout interval. | |
| user | no | $USER | Login username |
Note
Requires junos-eznc >= 1.2.2
- junos_rollback:
host: "{{ inventory_hostname }}"
logfile=rollback.log
diffs_file=rollback.diff
rollback=1
comment="Rolled back by Ansible"
confirm=5
# over console server connection using PyEZ >= 2.0
- junos_rollback:
host: "{{ inventory_hostname }}"
logfile=rollback.log
diffs_file=rollback.diff
rollback=1
comment="Rolled back by Ansible"
confirm=5
mode='telnet'
port=7015