eos_cli_config_gen¶
Note
Always use the FQCN (Fully Qualified Collection Name) arista.avd.eos_cli_config_gen
when using this plugin.
Generate AVD EOS device configurations and documentations
Synopsis¶
The arista.avd.eos_cli_config_gen
module is an Ansible Action Plugin providing the following capabilities:
- Validates input variables according to eos_cli_config_gen schema
- Generates device configuration and saves it to file
- Optionallu generates device documentation and saves it to file
Parameters¶
Argument | Type | Required | Default | Value Restrictions | Description |
---|---|---|---|---|---|
structured_config_filename | str | optional | None | The path of the structured config to load. Required if read_structured_config_from_file is true. | |
config_filename | str | optional | None | The path to save the generated config to. Required if generate_device_config is true. | |
documentation_filename | str | optional | None | The path to save the generated documentation. Required if generate_device_doc is true. | |
read_structured_config_from_file | bool | optional | True | Flag to indicate if the structured config should be read from a file or not. | |
generate_device_config | bool | optional | True | Flag to generate the device configuration. | |
generate_device_doc | bool | optional | True | Flag to generate the device documentation. | |
device_doc_toc | bool | optional | True | Flag to generate the table of content for the device documentation. | |
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 eos intended configuration and device documentation
arista.avd.eos_cli_config_gen:
structured_config_filename: "{{ structured_config_filename }}"
config_filename: "{{ eos_config_dir }}/{{ inventory_hostname }}.cfg"
documentation_filename: "{{ devices_dir }}/{{ inventory_hostname }}.md"
read_structured_config_from_file: true
delegate_to: localhost
vars:
structured_config_filename: "{{ structured_dir }}/{{ inventory_hostname }}.{{ avd_structured_config_file_format }}"
- name: Generate device documentation only
arista.avd.eos_cli_config_gen:
structured_config_filename: "{{ structured_config_filename }}"
config_filename: "{{ eos_config_dir }}/{{ inventory_hostname }}.cfg"
documentation_filename: "{{ devices_dir }}/{{ inventory_hostname }}.md"
read_structured_config_from_file: true
generate_device_config: false
device_doc_toc: true
delegate_to: localhost
vars:
structured_config_filename: "{{ structured_dir }}/{{ inventory_hostname }}.{{ avd_structured_config_file_format }}"
Authors¶
- Arista Ansible Team (@aristanetworks)