Role configuration for eos_cli_config_gen¶
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 }}'
# Device documentation
devices_dir_name: 'devices'
devices_dir: '{{ documentation_dir }}/{{ devices_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 }}'
# EOS Configuration Directory name
eos_config_dir_name: 'configs'
eos_config_dir: '{{ output_dir }}/{{ eos_config_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¶
Variable | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
avd_data_conversion_mode | String | debug |
Valid Values: - disabled - error - warning - info - debug - quiet |
Conversion Mode for AVD input data conversion. Input data conversion will perform type conversion of input variables as defined in the schema. The type conversion is intended to help the user to identify minor issues with the input data, while still allowing the data to be validated. During conversion, messages will generated with information about the host(s) and key(s) which required conversion. “disabled” means that conversion will not run - avoid this since conversion is also handling data deprecation and upgrade. “error” will produce error messages and fail the task. “warning” will produce warning messages. “info” will produce regular log messages. “debug” will produce hidden debug messages viewable with -v. “quiet” will not produce any messages. |
|
avd_data_validation_mode | String | warning |
Valid Values: - disabled - error - warning - info - debug |
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. “disabled” means that validation will not run. “error” will produce error messages and fail the task. “warning” will produce warning messages. “info” will produce regular log messages. “debug” will produce hidden debug messages viewable with -v. |
# Conversion Mode for AVD input data conversion.
# Input data conversion will perform type conversion of input variables as defined in the schema.
# The type conversion is intended to help the user to identify minor issues with the input data, while still allowing the data to be validated.
# During conversion, messages will generated with information about the host(s) and key(s) which required conversion.
# "disabled" means that conversion will not run - avoid this since conversion is also handling data deprecation and upgrade.
# "error" will produce error messages and fail the task.
# "warning" will produce warning messages.
# "info" will produce regular log messages.
# "debug" will produce hidden debug messages viewable with -v.
# "quiet" will not produce any messages.
avd_data_conversion_mode: <str; "disabled" | "error" | "warning" | "info" | "debug" | "quiet"; default="debug">
# 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.
# "disabled" means that validation will not run.
# "error" will produce error messages and fail the task.
# "warning" will produce warning messages.
# "info" will produce regular log messages.
# "debug" will produce hidden debug messages viewable with -v.
avd_data_validation_mode: <str; "disabled" | "error" | "warning" | "info" | "debug"; default="warning">
Extensibility with Custom Templates¶
- Custom templates can be added below the playbook directory.
- If a location above the directory is desired, a symbolic link can be used.
-
Example under the
playbooks
directory create symbolic link with the following command:
- The output will be rendered at the end of the configuration.
- The order of custom templates in the list can be important if they overlap.
- It is recommenended to use a
!
delimiter at the top of each custom template.
Tip
The templates will have any host or group variable available to it.
If adding custom keys to an existing AVD data model, start the key with an underscore _
, so it will be ignored by schema validation.
Variable | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
custom_templates | List, items: String | - Custom templates can be added below the playbook directory. - If a location above the directory is desired, a symbolic link can be used. - Example under the playbooks directory create symbolic link with the following command:bash<br> ln -s ../../shared_repo/custom_avd_templates/ ./custom_avd_templates<br> - The output will be rendered at the end of the configuration. - The order of custom templates in the list can be important if they overlap. - It is recommended to use a ! delimiter at the top of each custom template.Add custom_templates to group/host variables: |
|||
- <str> | String | Template relative path below playbook directory. |
# - Custom templates can be added below the playbook directory.
# - If a location above the directory is desired, a symbolic link can be used.
# - Example under the `playbooks` directory create symbolic link with the following command:
#
# ```bash
# ln -s ../../shared_repo/custom_avd_templates/ ./custom_avd_templates
# ```
#
# - The output will be rendered at the end of the configuration.
# - The order of custom templates in the list can be important if they overlap.
# - It is recommended to use a `!` delimiter at the top of each custom template.
#
# Add `custom_templates` to group/host variables:
custom_templates:
# Template relative path below playbook directory.
- <str>
eos_cli_config_gen configuration¶
Variable | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
eos_cli_config_gen_configuration | Dictionary | ||||
hide_passwords | Boolean | False |
Replace the input data using the hide_passwords filter in the Jinja2 templates by ‘ |
eos_cli_config_gen documentation¶
Variable | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
eos_cli_config_gen_documentation | Dictionary | ||||
hide_passwords | Boolean | True |
Replace the input data using the hide_passwords filter in the Jinja2 templates by ‘ |
Generate default config¶
The generate_default_config
knob allows to omit default EOS configuration.
This can be useful when leveraging eos_cli_config_gen
to generate configlets with CloudVision.
The following commands will be omitted when generate_default_config
is set to false
:
- RANCID Content Type
- Hostname
- Default configuration for
aaa
- Default configuration for
enable password
- Transceiver qsfp default mode
- End of configuration delimiter
Variable | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
generate_default_config | Boolean | True |
The generate_default_config knob allows to omit default EOS configuration.This can be useful when leveraging eos_cli_config_gen to generate configlets with CloudVision.The following commands will be omitted when generate_default_config is set to false :- RANCID Content Type - Hostname - Default configuration for aaa - Default configuration for enable password - Transceiver qsfp default mode - End of configuration delimiter |
# The `generate_default_config` knob allows to omit default EOS configuration.
# This can be useful when leveraging `eos_cli_config_gen` to generate configlets with CloudVision.
#
# The following commands will be omitted when `generate_default_config` is set to `false`:
#
# - RANCID Content Type
# - Hostname
# - Default configuration for `aaa`
# - Default configuration for `enable password`
# - Transceiver qsfp default mode
# - End of configuration delimiter
generate_default_config: <bool; default=True>
Generate device documentation¶
Variable | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
generate_device_documentation | Boolean | True |