Ansible Collection for Arista Validated Designs¶
Arista Networks supports Ansible for managing devices running Arista’s Extensible Operating System (EOS) natively through it’s EOS API (eAPI) or CloudVision Portal (CVP). This collection includes a set of Ansible roles and modules to help kick-start your automation with Arista. The various roles and templates provided are designed to be customized and extended to your needs.
Full documentation for the collection is available on read-the-docs:
The arista.avd collection provides abstracted data models and framework to build, document, deploy and validate the following designs:
Below are the underlay and overlay combinations that can be leveraged to deploy a layer three leaf spine (L3LS) Ethernet VPN (EVPN) fabric:
|eBGP||eBGP||Multi-Stage + L2 Leafs|
|ISIS||eBGP||Multi-Stage + L2 Leafs|
|ISIS||iBGP||Multi-Stage + L2 Leafs|
|OSPF||eBGP||Multi-Stage + L2 Leafs|
|OSPF||iBGP||Multi-Stage + L2 Leafs|
|RFC5549(eBGP)||eBGP||Multi-Stage + L2 Leafs|
This repository provides content for Arista’s arista.avd collection. The following roles are included.
- arista.avd.eos_designs - Opinionated Data model to assist with the deployment of Arista Validated Designs.
- arista.avd.eos_cli_config_gen - Generate Arista EOS cli syntax and device documentation.
- arista.avd.eos_config_deploy_cvp - Deploys intended configuration via CloudVision.
- arista.avd.eos_config_deploy_eapi - Deploys intended configuration via eAPI.
- arista.avd.cvp_configlet_upload - Uploads configlets from a local folder to CloudVision Server.
- arista.avd.eos_validate_state - Validate operational states of Arista EOS devices.
- arista.avd.eos_snapshot - Collect commands on EOS devices and generate reports.
- arista.avd.dhcp_provisioner - Configure an ISC-DHCP server to provide ZTP services and CloudVision registration.
Custom Plugins & Modules¶
This repository provides custom plugins for Arista’s AVD collection:
Ansible Galaxy hosts all stable versions of this collection. Installation from ansible-galaxy is the most convenient approach for consuming arista.avd content. Please follow this guide.
Please follow the requirements guide to install dependencies.
Ansible Configuration INI file:
Enable the following jinja2 extensions:
- loop controls
By default, Ansible will issue a warning when a duplicate dict key is encountered in YAML. We recommend changing this to error instead and stop playbook execution when a duplicate key is detected.
When using ansible-cvp modules, the user who is executing the ansible-playbook must have access to both CVP and the EOS CLI.
Example playbook to deploy an Arista Validated Design via CloudVision:
# Play to build EOS configuration from EOS_DESIGNS - hosts: DC1_FABRIC tasks: # BUILD EOS configuration - name: generate intended variables import_role: name: arista.avd.eos_designs - name: generate device intended config and documentation import_role: name: arista.avd.eos_cli_config_gen # Play to configure CloudVision - hosts: CVP tasks: # Generate CloudVision configuration & deployment - name: upload cvp configlets import_role: name: arista.avd.cvp_configlet_upload vars: configlet_directory: 'configlets/' file_extension: 'txt' configlets_cvp_prefix: 'DC1-AVD' - name: deploy configuration via CVP import_role: name: arista.avd.eos_config_deploy_cvp
Execute eos_validate_state playbook once change control has been approved and devices are deployed via CVP.
Running this playbook requires the following:
ansible_hostmust be configured in your inventory for every EOS device.
- eAPI access must be configured and allowed in your network.
Example playbook to deploy an Arista Validated Design via EOS eAPI:
# Play to build EOS configuration from EOS_DESIGNS + Deploy using eAPI - hosts: DC1_FABRIC tasks: # BUILD EOS configuration - name: generate intended variables import_role: name: arista.avd.eos_designs - name: generate device intended config and documentation import_role: name: arista.avd.eos_cli_config_gen # EOS eAPI deploy - name: deploy configuration via eAPI import_role: name: arista.avd.eos_config_deploy_eapi # EOS eAPI state validation - name: audit fabric state using EOS eAPI connection import_role: name: arista.avd.eos_validate_state
Full examples with variables and outputs, are located here:
Contributing pull requests are gladly welcomed for this repository. If you are planning a big change, please start a discussion first to make sure we’ll be able to merge it.
You can also open an issue to report any problem or to submit enhancement.
Project is published under Apache 2.0 License