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. |
| 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)