Skip to content

Role configuration for eos_designs

Role configuration settings can be set either as regular inventory variables or directly as task_vars on the import_role task.

Role default output directories

Default output directories can be updated by modifying the default role variables:

# Roles Defaults - ouptput directories

# Root directory where to build output structure
root_dir: '{{ inventory_dir }}'

# Documentation folders
# Main documentation folder
documentation_dir_name: 'documentation'
documentation_dir: '{{ root_dir }}/{{ documentation_dir_name }}'

# Fabric documentation
fabric_dir_name: 'fabric'
fabric_dir: '{{ documentation_dir }}/{{ fabric_dir_name }}'

# AVD configurations output
# Main output directory
output_dir_name: 'intended'
output_dir: '{{ root_dir }}/{{ output_dir_name }}'

# Output for structured YAML files:
structured_dir_name: 'structured_configs'
structured_dir: '{{ output_dir }}/{{ structured_dir_name }}'

Tip

You might need the outputs generated by AVD in a different folder than inventory (the default). If updating root_dir, leverage a relative path from inventory_dir to ensure consistent behavior. Example: root_dir: '{{ inventory_dir}/../outputs'.

Input Variables Validation settings

Schema validation is built in to the central Action plugins used in AVD. Each plugin runs variable type conversion first and then performs validation of the converted data.

By default any data validation issues will trigger errors - blocking further processing. This behavior can be adjusted by setting the variable described below.

Danger

The input variable avd_data_validation_mode now has a default value of error, and while it can be set to warning, this is highly discouraged. All AVD code relies on the validation to ensure valid data, so the code assumes that the data is valid.

If the validation mode is set to warning, execution will continue with invalid data, which can lead to hard-to-read errors or incorrect behavior.

Variable Type Required Default Value Restrictions Description
avd_data_conversion_mode removed String Conversion Mode for AVD input data conversion.
This key was removed. Support was removed in AVD version 5.0.0.
avd_data_validation_mode String error Valid Values:
- error
- warning
Validation Mode for AVD input data validation.
Input data validation will validate the input variables according to the schema.
During validation, messages will generated with information about the host(s) and key(s) which failed validation.
“error” will produce error messages and fail the task.
“warning” will produce warning messages.
# Validation Mode for AVD input data validation.
# Input data validation will validate the input variables according to the schema.
# During validation, messages will generated with information about the host(s) and key(s) which failed validation.
# "error" will produce error messages and fail the task.
# "warning" will produce warning messages.
avd_data_validation_mode: <str; "error" | "warning"; default="error">

Generation of facts, structured configuration and documentation

The following settings can be leveraged to control generation of facts, structured configuration and fabric documentation.

Variable Type Required Default Value Restrictions Description
avd_eos_designs_debug Boolean False Dump all vars and facts per device after generating avd_switch_facts.
avd_eos_designs_structured_config Boolean True Generate structured configuration per device.
avd_eos_designs_unset_facts Boolean True Unset avd_switch_facts to gain a small performance improvement since Ansible needs to handle fewer variables.
eos_designs_documentation Dictionary Control fabric documentation generation.
  enable Boolean True Generate fabric-wide documentation.
  connected_endpoints Boolean False Include connected endpoints in the fabric-wide documentation.
This is false by default to avoid cluttering documentation for projects with thousands of endpoints.
  topology_csv Boolean False Generate Topology CSV with all interfaces towards other devices.
  p2p_links_csv Boolean False Generate P2P links CSV with all routed point-to-point links between devices.
# Dump all vars and facts per device after generating `avd_switch_facts`.
avd_eos_designs_debug: <bool; default=False>

# Generate structured configuration per device.
avd_eos_designs_structured_config: <bool; default=True>

# Unset `avd_switch_facts` to gain a small performance improvement since Ansible needs to handle fewer variables.
avd_eos_designs_unset_facts: <bool; default=True>

# Control fabric documentation generation.
eos_designs_documentation:

  # Generate fabric-wide documentation.
  enable: <bool; default=True>

  # Include connected endpoints in the fabric-wide documentation.
  # This is `false` by default to avoid cluttering documentation for projects with thousands of endpoints.
  connected_endpoints: <bool; default=False>

  # Generate Topology CSV with all interfaces towards other devices.
  topology_csv: <bool; default=False>

  # Generate P2P links CSV with all routed point-to-point links between devices.
  p2p_links_csv: <bool; default=False>

Custom Templates

Variable Type Required Default Value Restrictions Description
eos_designs_custom_templates List, items: Dictionary
  - template String Required Template file.
    options Dictionary Template options.
      list_merge String append_rp Merge strategy for lists.
      strip_empty_keys Boolean True Filter out keys from the generated output if value is null/none/undefined.
eos_designs_custom_templates:

    # Template file.
  - template: <str; required>

    # Template options.
    options:

      # Merge strategy for lists.
      list_merge: <str; default="append_rp">

      # Filter out keys from the generated output if value is null/none/undefined.
      strip_empty_keys: <bool; default=True>