How do I manage my config snapshots - Ansible

0 votes
How do I manage the config snapshots of my deployment using ansible?
Feb 11, 2019 in Ansible by pandora
922 views

1 answer to this question.

0 votes

Hey @Pandora,

You can use the aci_config_snapshot module that ansible provides. you can create new snapshots using configExportP class and remove snapshots using configSnapshot class. Something like this:

- name: Create a Snapshot
  aci_config_snapshot:
    host: apic
    username: admin
    password: SomeSecretPassword
    state: present
    export_policy: config_backup
    max_count: 10
    description: Backups taken before new configs are applied.
  delegate_to: localhost

- name: Query all Snapshots
  aci_config_snapshot:
    host: apic
    username: admin
    password: SomeSecretPassword
    state: query
  delegate_to: localhost
  register: query_result

- name: Query Snapshots associated with a particular Export Policy
  aci_config_snapshot:
    host: apic
    username: admin
    password: SomeSecretPassword
    export_policy: config_backup
    state: query
  delegate_to: localhost
  register: query_result

- name: Delete a Snapshot
  aci_config_snapshot:
    host: apic
    username: admin
    password: SomeSecretPassword
    export_policy: config_backup
    snapshot: run-2017-08-24T17-20-05
    state: absent
  delegate_to: localhost
answered Feb 11, 2019 by Kyra

Related Questions In Ansible

0 votes
1 answer

How do I manage Server Load balancing on A10 network? - Ansible

Hey @Tanishq, you can use the a10_server ...READ MORE

answered Feb 11, 2019 in Ansible by Myra
1,187 views
0 votes
1 answer

How do i set multiple authorized keys to my ansible playbook?

Try this: - name: Set up multiple authorized ...READ MORE

answered Feb 12, 2019 in Ansible by John
1,483 views
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 7,340 points
6,914 views
0 votes
2 answers

How do i install Ansible using virtualenv

Adding to @Mohit's answer,  For CentOS and RHEL: sudo ...READ MORE

answered Jan 10, 2019 in Ansible by Dikinson
5,650 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,065 views
+2 votes
1 answer
0 votes
1 answer

How do I backup my ansible playbooks?

In addition to the install.yml file included with your setup.sh setup ...READ MORE

answered Feb 4, 2019 in Ansible by Anushri
777 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP