ce_rollback - Set a checkpoint or rollback to a checkpoint on HUAWEI CloudEngine switches.
New in version 2.4.
Synopsis
- This module offers the ability to set a configuration checkpoint file or rollback to a configuration checkpoint file on HUAWEI CloudEngine switches.
Options
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| action | yes |
| The operation of configuration rollback. | |
| commit_id | no | Specifies the label of the configuration rollback point to which system configurations are expected to roll back. The value is an integer that the system generates automatically. | ||
| filename | no | Specifies a configuration file for configuration rollback. The value is a string of 5 to 64 case-sensitive characters in the format of *.zip, *.cfg, or *.dat, spaces not supported. | ||
| label | no | Specifies a user label for a configuration rollback point. The value is a string of 1 to 256 case-sensitive ASCII characters, spaces not supported. The value must start with a letter and cannot be presented in a single hyphen (-). | ||
| last | no | Specifies the number of configuration rollback points. The value is an integer that ranges from 1 to 80. | ||
| oldest | no | Specifies the number of configuration rollback points. The value is an integer that ranges from 1 to 80. |
Examples
- name: rollback module test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Ensure commit_id is exist, and specifies the label of the configuration rollback point to
which system configurations are expected to roll back.
ce_rollback:
commit_id: 1000000748
action: rollback
provider: "{{ cli }}"
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
| name | description | returned | type | sample |
|---|---|---|---|---|
| changed | check to see if a change was made on the device | always | boolean | True |
| end_state | k/v pairs of configuration after module execution | always | dict | {'commitId': '1000000748', 'userLabel': 'abc'} |
| existing | k/v pairs of existing rollback | sometimes | dict | {'commitId': '1000000748', 'userLabel': 'abc'} |
| proposed | k/v pairs of parameters passed into module | sometimes | dict | {'commit_id': '1000000748', 'action': 'rollback'} |
| updates | command sent to the device | always | list | ['rollback configuration to file a.cfg', 'set configuration commit 1000000783 label ddd', 'clear configuration commit 1000000783 label', 'display configuration commit list'] |
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/ce_rollback_module.html