ansible / ansible.builtin / v2.9.26 / module / ce_rollback Set a checkpoint or rollback to a checkpoint on HUAWEI CloudEngine switches. | "added in version" 2.4 of ansible.builtin" Authors: Li Yanfeng (@QijunPan) preview | supported by communityansible.builtin.ce_rollback (v2.9.26) — module
pip
Install with pip install ansible==2.9.26
This module offers the ability to set a configuration checkpoint file or rollback to a configuration checkpoint file on HUAWEI CloudEngine switches.
- 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 }}"
last: description: - Specifies the number of configuration rollback points. The value is an integer that ranges from 1 to 80. label: description: - 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 (-). action: choices: - rollback - clear - set - display - commit description: - The operation of configuration rollback. required: true oldest: description: - Specifies the number of configuration rollback points. The value is an integer that ranges from 1 to 80. filename: description: - 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. commit_id: description: - 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.
changed: description: check to see if a change was made on the device returned: always sample: true type: bool end_state: description: k/v pairs of configuration after module execution returned: always sample: commitId: '1000000748' userLabel: abc type: dict existing: description: k/v pairs of existing rollback returned: sometimes sample: commitId: '1000000748' userLabel: abc type: dict proposed: description: k/v pairs of parameters passed into module returned: sometimes sample: action: rollback commit_id: '1000000748' type: dict updates: description: command sent to the device returned: always sample: - rollback configuration to file a.cfg - set configuration commit 1000000783 label ddd - clear configuration commit 1000000783 label - display configuration commit list type: list