community_fabric.ansible.snapshot_info module – Fetch Snapshot information 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_info.

Synopsis

  • Fetch Snapshot information within IP Fabric.

Parameters

Parameter

Comments

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 ID to use by default for database actions. Defaults to False.

Examples

- name: Get All Snapshots
  community_fabric.ansible.snapshot_info:
    provider:
      base_url: "https://demo1.ipfabric.io/"
      auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"

- name: Get One Snapshot
  community_fabric.ansible.snapshot_info:
    provider:
      base_url: "https://demo1.ipfabric.io/"
      auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
    snapshot_id: bbc15e2e-4e75-4c54-9526-b6d8d3f9ff8b
  register: snapshots

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

data

list / elements=dictionary

IP Fabric snapshot information

Returned: success

Sample: [{"count": 61, "end": "2022-01-26T23:07:39.641000+00:00", "licensed_count": 61, "locked": false, "name": "test_daren", "note": "Site 35 - Baseline, before adding the Azure infrastructure", "sites": [{"site_id": "2019877", "uid": "35COLO"}, {"site_id": "2019883", "uid": "35HEADOFFICE"}, {"site_id": "2019888", "uid": "35PRODUCTION"}, {"site_id": "2019895", "uid": "35SALES"}, {"site_id": "2019900", "uid": "MPLS"}], "snapshot_id": "d323b197-35bb-41e5-9a42-d4de9b38ccaa", "start": "2022-01-26T22:59:15.816000+00:00", "state": "loaded", "status": "done", "version": "5.0.2+5"}]

Authors

  • Alex Gittings (@minitriga)