�
�Udac @ s� i d d 6d g d 6d d 6Z d Z d Z d Z d d
l m Z m Z d d l m Z d � Z d
� Z
d � Z e d k r� e � n d S( s 1.1t metadata_versiont previewt statust networkt supported_bys.
---
module: nxos_rollback
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Set a checkpoint or rollback to a checkpoint.
description:
- This module offers the ability to set a configuration checkpoint
file or rollback to a configuration checkpoint file on Cisco NXOS
switches.
author:
- Jason Edelman (@jedelman8)
- Gabriele Gerbino (@GGabriele)
notes:
- Tested against NXOSv 7.3.(0)D1(1) on VIRL
- Sometimes C(transport=nxapi) may cause a timeout error.
options:
checkpoint_file:
description:
- Name of checkpoint file to create. Mutually exclusive
with rollback_to.
rollback_to:
description:
- Name of checkpoint file to rollback to. Mutually exclusive
with checkpoint_file.
s
- nxos_rollback:
checkpoint_file: backup.cfg
username: "{{ un }}"
password: "{{ pwd }}"
host: "{{ inventory_hostname }}"
- nxos_rollback:
rollback_to: backup.cfg
username: "{{ un }}"
password: "{{ pwd }}"
host: "{{ inventory_hostname }}"
s
filename:
description: The filename of the checkpoint/rollback file.
returned: success
type: str
sample: 'backup.cfg'
status:
description: Which operation took place and whether it was successful.
returned: success
type: str
sample: 'rollback executed'
i����( t nxos_argument_spect run_commands( t
AnsibleModulec C s= i d d 6d d 6i d | d 6d d 6g } t | | � d S( Ns terminal dont-askt commandt textt outputs checkpoint file %s( R ( t filenamet modulet commands( ( sN /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_rollback.pyt
checkpointR s
c C s, i d | d 6d d 6g } t | | � d S( Ns rollback running-config file %sR R R
( R ( R R R
( ( sN /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_rollback.pyt rollback\ s
c C s� t d t d t � d t d t � � } | j t � t d | d d d g g d t � } | j d } | j d } d } d } t } | r� t | | � d } n | r� t | | � d } n t } | p� | } | j
d | d
| d | � d S( Nt checkpoint_filet requiredt rollback_tot
argument_spect mutually_exclusivet supports_check_modes checkpoint file createds rollback executedt changedR R ( t dictt Falset updateR R t paramst NoneR R t Truet exit_json( R R R R R R R ( ( sN /usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_rollback.pyt maind s,
t __main__N(
t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt&