eos_designs_facts¶
Note
Always use the FQCN (Fully Qualified Collection Name) arista.avd.eos_designs_facts when using this plugin.
Set eos_designs facts
Synopsis¶
The arista.avd.eos_designs_facts module is an Ansible Action Plugin providing the following capabilities:
- Set
avd_switch_factsfact containing bothswitchfacts per host. - Set
avd_topology_peersfact containing list of downlink switches per host. This list is built based on theuplink_switchesfrom all other hosts. - Set
avd_overlay_peersfact containing list of EVPN or MPLS overlay peers per host. This list is built based on theevpn_route_serversandmpls_route_reflectorsfrom all other hosts.
The plugin is designed to run_once. With this, Ansible will set the same facts on all devices, so all devices can lookup values of any other device without using the slower hostvars.
The facts can also be copied to the "root" switch in a task run per-device (see example below)
The module is used in arista.avd.eos_designs to set facts for devices, which are then used by jinja templates and python module in arista.avd.eos_designs to generate the structured_configuration.
Parameters¶
| Argument | Type | Required | Default | Value Restrictions | Description |
|---|---|---|---|---|---|
| template_output | bool | False | None | If true, the output data will be run through another jinja2 rendering before returning. This is to resolve any input values with inline jinja using variables/facts set by the input templates. | |
| validation_mode | str | False | error | Valid values: - error- warning |
Run validation in either "error" or "warning" mode. Validation will validate the input variables according to the schema. During validation, messages will be generated with information about the host(s) and key(s) which failed validation. validation_mode:error will produce error messages and fail the task. validation_mode:warning will produce warning messages. |
| cprofile_file | str | False | None | Filename for storing cprofile data used to debug performance issues. Running cprofile will slow down performance in it self, so only set this while troubleshooting. |
Examples¶
---
- name: Set eos_designs facts
arista.avd.eos_designs_facts:
schema_id: eos_designs
check_mode: false
run_once: true
- name: Set eos_designs facts per device
ansible.builtin.set_fact:
switch: "{{ avd_switch_facts[inventory_hostname].switch }}"
delegate_to: localhost
changed_when: false
Authors¶
- Arista Ansible Team (@aristanetworks)