W3cubDocs

/Ansible

aci_config_rollback - Provides rollback and rollback preview functionality for Cisco ACI fabrics (config:ImportP)

New in version 2.4.

Synopsis

Requirements (on host that executes module)

  • ACI Fabric 1.0(3f)+

Options

parameter required default choices comments
compare_export_policy
no
The export policy that the compare_snapshot is associated to.
compare_snapshot
no
The name of the snapshot to compare with snapshot.
description
no
The description for the Import Policy.
aliases: descr
export_policy
yes
The export policy that the snapshot is associated to.
fail_on_decrypt
no yes
  • yes
  • no
Determines if the APIC should fail the rollback if unable to decrypt secured data.
The APIC defaults new Import Policies to yes.
hostname
yes
IP Address or hostname of APIC resolvable by Ansible control host.
aliases: host
import_mode
no atomic
  • atomic
  • best-effort
Determines how the import should be handled by the APIC.
The APIC defaults new Import Policies to atomic.
import_policy
no
The name of the Import Policy to use for config rollback.
import_type
no replace
  • merge
  • replace
Determines how the current and snapshot configuration should be compared for replacement.
The APIC defaults new Import Policies to replace.
password
yes
The password to use for authentication.
snapshot
yes
The name of the snapshot to rollback to, or the base snapshot to use for comparison.
The aci_snapshot module can be used to query the list of available snapshots.
state
no rollback
  • preview
  • rollback
Use preview for previewing the diff between two snapshots.
Use rollback for reverting the configuration to a previous snapshot.
timeout
no 30
The socket level timeout in seconds.
use_proxy
no yes
  • yes
  • no
If no, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
use_ssl
no yes
  • yes
  • no
If no, an HTTP connection will be used instead of the default HTTPS connection.
username
yes admin
The username to use for authentication.
aliases: user
validate_certs
no yes
  • yes
  • no
If no, SSL certificates will not be validated.
This should only set to no used on personally controlled sites using self-signed certificates.

Examples

---
- name: Create a Snapshot
  aci_config_snapshot:
    hostname: apic
    username: admin
    password: SomeSecretPassword
    state: present
    export_policy: config_backup

- name: Query Existing Snapshots
  aci_config_snapshot:
    hostname: apic
    username: admin
    password: SomeSecretPassword
    state: query
    export_policy: config_backup

- name: Compare Snapshot Files
  aci_config_rollback:
    hostname: apic
    username: admin
    password: SomeSecretPassword
    state: preview
    export_policy: config_backup
    snapshot: 'run-2017-08-28T06-24-01'
    compare_export_policy: config_backup
    compare_snapshot: 'run-2017-08-27T23-43-56'

- name: Rollback Configuration
  aci_config_rollback:
    hostname: apic
    username: admin
    password: SomeSecretPassword
    state: rollback
    import_policy: rollback_config
    export_policy: config_backup
    snapshot: 'run-2017-08-28T06-24-01'

- name: Rollback Configuration
  aci_config_rollback:
    hostname: apic
    username: admin
    password: SomeSecretPassword
    state: rollback
    import_policy: rollback_config
    export_policy: config_backup
    snapshot: 'run-2017-08-28T06-24-01'
    description: 'Rollback 8-27 changes'
    import_mode: atomic
    import_type: replace
    fail_on_decrypt: yes

Notes

Note

  • By default, if an environment variable <protocol>_proxy is set on the target host, requests will be sent through that proxy. This behaviour can be overridden by setting a variable for this task (see setting the environment), or by using the use_proxy option.
  • HTTP redirects can redirect from HTTP to HTTPS so you should be sure that your proxy environment for both protocols is correct.

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–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/aci_config_rollback_module.html