ntc_rollback¶
Synopsis¶
This module offers the ability to set a configuration checkpoint file or rollback to a configuration checkpoint file on supported Cisco or Arista switches. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.
Options¶
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| checkpoint_file | no |
Name of checkpoint file to create. Mutually exclusive with rollback_to. |
||
| host | yes |
Hostame or IP address of switch. |
||
| ntc_conf_file | no |
The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf. |
||
| ntc_host | no |
The name of a host as specified in an NTC configuration file. |
||
| password | yes |
Password used to login to the target device. |
||
| platform | yes |
|
Vendor and platform identifier. |
|
| port | no |
TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH. |
||
| rollback_to | no |
Name of checkpoint file to rollback to. Mutually exclusive with checkpoint_file. |
||
| secret | no |
Enable secret for devices connecting over SSH. |
||
| transport | no |
|
Transport protocol for API. Only needed for NX-API and eAPI. If omitted, platform-specific default will be used. |
|
| username | yes |
Username used to login to the target device. |
Important
Requires pyntc
Examples¶
- ntc_rollback:
ntc_host: eos1
checkpoint_file: backup.cfg
- ntc_rollback:
ntc_host: eos1
rollback_to: backup.cfg
Return Values¶
Common return values are documented here common_return_values, the following are the fields unique to this module:
| name | despcription | returned | type | sample |
|---|---|---|---|---|
| status | Which operation took place and whether it was successful. | success | string | rollback executed |
| filename | The filename of the checkpoint/rollback file. | success | string | backup.cfg |
Note
This module is not idempotent.