community_fabric.ansible.snapshot module – Create, Update, Load, Unload or Delete Snapshots within IP Fabric

Note

This module is part of the community_fabric.ansible collection (version 0.0.8).

To install it, use: ansible-galaxy collection install community_fabric.ansible.

To use it in a playbook, specify: community_fabric.ansible.snapshot.

Synopsis

  • Create, Update, Load, Unload or Delete Snapshots within IP Fabric

Parameters

Parameter

Comments

devices

list / elements=string

List of device serial numbers to rediscover

provider

dictionary / required

Information used to connect to IP Fabric via API

api_version

string

The version of the IP Fabric REST API.

auth

string / required

IP Fabric API auth token to be able to gather device information.

base_url

string / required

Url of the IP Fabric API

timeout

integer

Set HTTP Timeout

verify

boolean

Allows connection when SSL certificates are not valid. Set to false when certificated are not trusted.

Choices:

  • false

  • true ← (default)

snapshot_id

string

IP Fabric snapshot IF to use by default for database actions. Defaults to False.

snapshot_name

string

Set snapshot name

snapshot_note

string

Set snapshot description

state

string

State of snapshot.

Choices:

  • "present" ← (default)

  • "absent"

  • "load"

  • "unload"

  • "lock"

  • "unlock"

  • "clone"

  • "rediscover"

Examples

- name: Start Snapshot
  community_fabric.ansible.snapshot:
    provider:
      base_url: "https://demo1.ipfabric.io/"
      auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"

- name: Delete Snapshot
  community_fabric.ansible.snapshot:
    provider:
      base_url: "https://10.194.50.6/"
      auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
    snaphot_id: 12dd8c61-129c-431a-b98b-4c9211571f89
    state: absent

- name: Unload Snapshot
  community_fabric.ansible.snapshot:
    provider:
      base_url: "https://10.194.50.6/"
      auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
    snaphot_id: 12dd8c61-129c-431a-b98b-4c9211571f89
    state: unload

- name: Clone Snapshot
  community_fabric.ansible.snapshot:
    provider:
      base_url: "https://10.194.50.6/"
      auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
    snaphot_id: 12dd8c61-129c-431a-b98b-4c9211571f89
    state: clone

- name: Clone Snapshot
  community_fabric.ansible.snapshot:
    provider:
      base_url: "https://10.194.50.6/"
      auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
    snaphot_id: 12dd8c61-129c-431a-b98b-4c9211571f89
    devices:
      - 9AMSST2E75V
    state: rediscover

Authors

  • Alex Gittings (@minitriga)