Extracts facts for a Batfish snapshot
- Extracts and returns facts for a Batfish snapshot and saves them (one YAML file node) to the output directory if specified.
The following software packages must be installed on hosts that execute this module:
- pybatfish
The following options may be specified for this module:
| parameter | type | required | default | comments |
|---|---|---|---|---|
| network |
str | no | Value in the bf_network fact. |
Name of the network to extract facts for.
|
| nodes |
str | no | All nodes |
Nodes to extract facts for. See https://github.com/batfish/batfish/blob/master/questions/Parameters.md#node-specifier for more details on node specifiers.
|
| output_directory |
str | no | None |
Directory to save facts to.
|
| session |
dict | no | Value in the bf_session fact. |
Batfish session object required to connect to the Batfish service.
|
| snapshot |
str | no | Value in the bf_snapshot fact. |
Name of the snapshot to extract facts for.
|
# Extract facts and save to an output directory
- bf_extract_facts:
output_directory: output/facts/
# Extract facts for nodes whose names contain as1border or host
- bf_extract_facts:
nodes: /as1border|host/
| name | description | returned | type | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| result |
Dictionary of extracted facts.
|
always | complex | |||||||||||||
| contains: |
|
|||||||||||||||
| summary |
Summary of action(s) performed.
|
always | str | |||||||||||||
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.