• Introducing Arista EOS Roles for Ansible

 
 
Print Friendly, PDF & Email

This article introduces the newly released Arista EOS role for Ansible.  The Arista EOS role provides a set of Ansible modules that can used in playbooks for automating the configuration of network resources contained in Arista EOS nodes.  The EOS role replaces the existing arista_* modules that are currently available in the Ansible distribution.  The base code that comprises the EOS role has been re-worked from the beginning, influenced by lessons learned from the first generation modules.   In addition, the EOS role now takes advantage of Ansible Galaxy to provide a streamlined distribution mechanism to make getting started with automating EOS a breeze.

The EOS role has been developed by the Arista EOS+ organization and the modules are provided to all Arista customers that wish to get started automating their network infrastructures using Ansible.  In addition, the Arista EOS+ organization provides full technical and implementation support of the modules based on a best effort, community driven model as well as formal professional services engagements designed to assist customers with their automation projects.

The development of the EOS role focuses on easing the transition from traditional command and control via CLI to using Ansible to automate device configurations.  In doing so, the EOS role provides a set of modules that allow the network and/or devops team(s) to decide how much of the configuration should be automated, facilitating  an easy transition to a fully automated, operational environment.

The set of modules that are available as of version 0.1.0 include:

  • eos_command – sends a list of EOS commands to the node and returns the output
  • eos_vlan – provides configuration and state management of VLAN resources
  • eos_switchport – provides configuration and state management of switchport resources
  • eos_interface – provides configuration and state management for interfaces
  • eos_portchannel – provides configuration and state management for port-channel interfaces
  • eos_vxlan – provides configuration and state management for VxLAN tunnel interfaces
  • eos_ipv4interface – provides configuration and state management for IP interfaces

All of the modules listed above are available via the arista.eos role found here.  The arista.eos role is also hosted in source form at github.com at http://github.com/arista-eosplus/ansible-eos.

All of the roles are extensively documented in the source code adhering to Ansible best practices for documentation.  Additional roles and modules are planned for the future as well as enhancements to the currently available ones and the Arista EOS+ team always welcomes pull requests to existing code.

To get started with the arista.eos role, simply add the role to an existing Ansible control host using the ansible-galaxy command.

$ ansible-galaxy install arista.eos
downloading role 'eos', owned by arista
no version specified, installing v0.1.0
- downloading role from https://github.com/arista-eosplus/ansible-eos/archive/v0.1.0.tar.gz
- extracting arista.eos to /etc/ansible/roles/arista.eos
arista.eos was installed successfully

The arista.eos role provides everything necessary to start automating network resources using Ansible.  In order to use the arsta.eos role, the EOS command API must be enabled.   The role has been designed to work by running either on the destination node or using a connection: local and sending commands over eAPI.  The README file provides a step by step set of instructions for preparing the EOS node to be managed by Ansible.

Over time, additional modules are planned to be implemented as part of the EOS role.   For customers that want to contribute code to the repository, simply send a pull request and it will be reviewed by EOS+ for possible inclusion in a future iteration of the EOS role.

Future articles will start to dive deeper into each of the provided modules and provide more details on how to effectively use them to automate network resources using the arista.eos role.

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: