eos_designs_structured_config¶
Note
Always use the FQCN (Fully Qualified Collection Name) arista.avd.eos_designs_structured_config
when using this plugin.
Generate AVD EOS Designs structured configuration
Synopsis¶
The arista.avd.eos_designs_structured_config
module is an Ansible Action Plugin providing the following capabilities:
- Validates input variables according to eos_designs schema
- Generates structured configuration
- Optionally run any custom jinja2 YAML templates and merge result onto structured configuration
- Optionally run jinja2 templating the generated structured configuration
- Optionally write structured configuration to a JSON or YAML file
- Return structured configuration as "ansible_facts"
Parameters¶
Argument | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
eos_designs_custom_templates | list | False | None | List of dicts for Jinja2 templates to be run after generating the structured configuration | |
template | str | True | None | Template file. | |
options | dict | False | None | Template options | |
list_merge | str | False | append | Merge strategy for lists | |
strip_empty_keys | bool | False | True | Filter out keys from the generated output if value is null/none/undefined Only applies to templates. |
|
dest | str | False | None | Destination path. If set, the output facts will also be written to this path. Autodetects data format based on file suffix. '.yml', '.yaml' -> YAML, default -> JSON |
|
mode | str | False | None | File mode (ex. "0o664") for dest file. See 'ansible.builtin.copy' module for details. | |
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: Generate device configuration in structured format
arista.avd.eos_designs_structured_config:
templates:
- template: "custom_templates/custom_feature1.j2"
- template: "custom_templates/custom_feature2.j2"
options:
list_merge: replace
strip_empty_keys: false
check_mode: no
changed_when: False
Authors¶
- Arista Ansible Team (@aristanetworks)