community_fabric.ansible.configs module – Fetch tables from 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.configs
.
Synopsis
Fetch tables from IP Fabric.
Parameters
Parameter |
Comments |
---|---|
Date of configuration to retrieve |
|
Absolute path where the file should be created to. If |
|
Hostname or IP of device |
|
Information used to connect to IP Fabric via API |
|
The version of the IP Fabric REST API. |
|
IP Fabric API auth token to be able to gather device information. |
|
Url of the IP Fabric API |
|
Set HTTP Timeout |
|
Allows connection when SSL certificates are not valid. Set to Choices:
|
|
Mask passwords Choices:
|
|
Device serial number |
Examples
- name: Get last configuration for L35ABC
community_fabric.ansible.configs:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
device: L35ABC
- name: Get last configuration for L35ABC and save in a file
community_fabric.ansible.configs:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
device: L35ABC
dest: /tmp/config.txt
- name: Get previous configuration for L35ABC
community_fabric.ansible.configs:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
device: L35ABC
date: $prev # $last and $first supported
- name: Get configurations between specific dates for L35ABC
community_fabric.ansible.configs:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
device: L35ABC
date:
- 11/22/ 1:30 #string or int supported
- 1637629200
- name: Get all configurations for all devices
community_fabric.ansible.configs:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
all: true
- name: Get all configurations for a L35ABC device
community_fabric.ansible.configs:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
all: true
device: L35ABC