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

Schema validation is performed by the validate_inputs action plugin which is called automatically by the role. The plugin performs variable type conversion and validation of the converted data against the AVD schema.

Any data validation issues will trigger errors - blocking further processing.

Generation of facts, structured configuration and documentation

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

Variable Type Required Default Value Restrictions Description
avd_6_behaviors removed Dictionary This key was removed. Support was removed in AVD version 6.0.0.
avd_digital_twin_mode Boolean False PREVIEW: This option is marked as “preview”, meaning the data models or generated configuration can change at any time.
Enable generation of the Digital Twin version of the fabric (Digital Twin topology, adjusted configuration, etc.).
By default, Digital Twin artifacts (such as the topology file, adjusted structured and EOS configuration, device and fabric documentation) will replace original fabric artifacts.
To keep Digital Twin artifacts separate, adjust the output_dir_name and documentation_dir_name variables for both eos_designs and eos_cli_config_gen to point to a dedicated output location.
avd_eos_designs_debug removed Boolean This key was removed. Support was removed in AVD version 6.0.0.
avd_eos_designs_enforce_duplication_checks_across_all_models removed Boolean This key was removed. Support was removed in AVD version 6.0.0.
avd_eos_designs_return_structured_config Boolean False Return structured configuration as ansible_facts per device.
avd_eos_designs_structured_config Boolean True Generate structured configuration per device.
avd_eos_designs_unset_facts removed Boolean This key was removed. Support was removed in AVD version 6.0.0.
avd_eos_designs_validate_inputs_batch_size Integer 10 The number of hosts to process in each batch when validating inputs.
Depending on your inventory size and the available resources, you may want to adjust this number.
avd_structured_config_file_format String yml Valid Values:
- yml
- yaml
- json
The file format to use when dumping structured configuration files.
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.
  toc Boolean True Generate the table of content(TOC) on fabric documentation.
# PREVIEW: This option is marked as "preview", meaning the data models or generated configuration can change at any time.
# Enable generation of the Digital Twin version of the fabric (Digital Twin topology, adjusted configuration, etc.).
# By default, Digital Twin artifacts (such as the topology file, adjusted structured and EOS configuration, device and fabric documentation) will replace original fabric artifacts.
# To keep Digital Twin artifacts separate, adjust the `output_dir_name` and `documentation_dir_name` variables for both `eos_designs` and `eos_cli_config_gen` to point to a dedicated output location.
avd_digital_twin_mode: <bool; default=False>

# Return structured configuration as ansible_facts per device.
avd_eos_designs_return_structured_config: <bool; default=False>

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

# The number of hosts to process in each batch when validating inputs.
# Depending on your inventory size and the available resources, you may want to adjust this number.
avd_eos_designs_validate_inputs_batch_size: <int; default=10>

# The file format to use when dumping structured configuration files.
avd_structured_config_file_format: <str; "yml" | "yaml" | "json"; default="yml">

# 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>

  # Generate the table of content(TOC) on fabric documentation.
  toc: <bool; default=True>

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>