Posted on August 28, 2015 11:41 am
 |  Asked by Werner Viljoen
Print Friendly, PDF & Email


This Ansible playbook allows an administrator to easily configure a Cloud Vision Exchange (CVX) environment as well as configure a Virtual Extensible LAN (VXLAN) between two switches in an environment built using Arista switches, whether they be physical or virtual (vEOS). It is ideally suited for test environments and administrators wanting to test CVX and VXLAN. The playbook can be modified for more complex deployments.

Running the playbook:
From the /etc/ansible directory in the Linux CLI run: ansible-playbook cvx_vxlan_playbook.yaml


  • An Ansible server (
  • arista.eos roles for Ansible v1.0.1 # sudo ansible-galaxy install arista.eos.
  • Rename the following files under /etc/ansible/roles/arista.eos/library to not have a .py extension i.e becomes eos_config. At the same time you can verify that you have the correct version of the arista.eos roles as at least one is not in version 1.0.0.
    • cp eos_config
    • cp eos_vlan
    • cp eos_vxlan
    • cp eos_vxlan_vlan
    • cp eos_interface
    • cp eos_ipinterface
    • cp eos_switchport
  • Pyeapi (
  • Configure ~/.eapi.conf with entries for the switches. This file contains authentication and transport type information to the switches.
  • Enable eapi on switches via CLI:
    • (config)# management api http-commands
    • (config)# no shutdown
  • Extract under the /etc/ansible directory.Make sure the files are extracted to /etc/ansible directory. Two files are extracted:
    • cvx_vxlan_playbook.yaml
    • cvx_vxlan_variables
  • Modify a hosts file with entries for the switches. This file contains destinations to run the playbook on and can contain switch groupings. The hosts file is automatically created containing examples when Ansible is installed. I use host-names instead of IP Addressing in my examples.
  • Modify the necessary variables in cvx_vxlan_variables file that was extracted.
  • Select the tasks NOT to run by pre-pending with a #. This is at the top of the cvx_vxlan_variables file.
  • Basic knowledge of the open-source Ansible DevOps tool and Linux CLI is preferably required.

While the prerequisites might seem a lot, most part of it is  just ensuring you have a working Ansible server and environment to use DevOps on the switches. Once the environment is prepared you can build customer playbooks for network wide deployment and auditing of configuration (

If the playbook runs successfully it should look like this:

[caption id=”attachment_6019″ align=”aligncenter” width=”300″]If the playbook runs successfully it will look something like this If the playbook runs successfully it will look something like this.[/caption]




Post your Answer

You must be logged in to post an answer.