community_fabric.ansible.table_info 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.table_info
.
Synopsis
Fetch tables from IP Fabric.
Parameters
Parameter |
Comments |
---|---|
Columns that are to be returned upon successful query. Default: |
|
Filter to apply to the table query. Default: |
|
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:
|
|
Return report information when filtering by report. |
|
IP Fabric snapshot ID to use by default for database actions. Defaults to |
|
Sort IP Fabric API response. Default: |
|
Specific table to return from API. Choices:
|
|
IP Fabric technology Choices:
|
Examples
- name: Get devices table from latest snapshot
community_fabric.ansible.table_info:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
technology: inventory
table: devices
- name: Get devices for a site on specific snapshot and filter by site
community_fabric.ansible.table_info:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
snapshot_id: bbc15e2e-4e75-4c54-9526-b6d8d3f9ff8b
technology: inventory
table: devices
filter: {"and": [{"siteName": ["eq","MERAKI_SITE"]}]}
- name: Get devices for a site and only return specific columns
community_fabric.ansible.table_info:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
technology: inventory
table: devices
filter: {"and": [{"siteName": ["eq","MERAKI_SITE"]}]}
columns:
- hostname
- family
- loginIp
- name: Get Technology Info
community_fabric.ansible.table_info:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
technology: routing
table: ospf_interfaces
- name: Filter technology table
community_fabric.ansible.table_info:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
snapshot_id: bbc15e2e-4e75-4c54-9526-b6d8d3f9ff8b
technology: addressing
table: arp_table
filter: {"and": [{"ip": ["eq","10.241.21.2"]}]}
- name: Filter and select columns on technology table
community_fabric.ansible.table_info:
provider:
base_url: "https://demo1.eu.ipfabric.io/"
auth: "{{ lookup('ansible.builtin.env', 'IPF_TOKEN')}}"
snapshot_id: bbc15e2e-4e75-4c54-9526-b6d8d3f9ff8b
technology: addressing
table: arp_table
columns:
- hostname
- intName
- ip
- mac
- vrf
filter: {"and": [{"ip": ["eq","10.241.21.2"]}]}
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
IP Fabric table data. Returned: success Sample: |