Git Product home page Git Product logo

arista_eos_automation_with_ansible's Introduction

Table of content

About this repository
Playbooks description
Repository structure
Network topology

About this repository

This repository has Ansible playbooks examples to automate Arista EOS.

Playbooks description

The playbooks are at the root of this repository. The playbooks name is playbook_*.yml.

These playbooks update devices configuration:

These playbooks collect data from devices:

These playbooks validate the devices states:

  • playbook_validate_states.yml validates the devices states.
    It is used to validate this lab.
    The validation covers HW model, SW release, environment (cooling, temperature, power), interfaces status, LLDP topology, BGP sessions, IP reachability tests.
    It compares the actual states with the desired states, and reports mismatches.

    • The desired states are described in variables (host_vars and group_vars directories). So we reuse the same variables we already used to generate the configuration files.
    • The actual states are the states on the devices. To get the actual states, it runs show commands with a json output, and parses the output.
    • This playbook is interresting for CI because if a test fails, the pipeline will fail (either all the tests pass, or, the pipeline fails).
  • playbook_generate_audit_report.yml audits the devices and generates this humans readable report.
    It is used to audit this lab.
    The audit covers HW model, SW release, environment (cooling, temperature, power), interfaces status, LLDP topology, BGP sessions, IP reachability tests.
    It compares the actual states with the desired states and generates a report:

    • The desired states are described in variables (host_vars and group_vars directories). So we reuse the same variables we already used to generate the configuration files.
    • The actual states are the states on the devices.
    • It runs show commands with a json representation and registers the outputs in variables. It doesnt process the data collected.
    • Then it renders a template to generate the report. The data processing (data parsing and data comparaison) is done by the template (not by the playbook).
    • This playbook doesnt fail if a test fails (because this playbook doesn’t run the tests itself, the tests are ran by the template). So as example if a bgp session is not established the playbook will not fail but the report generated by the template will highlight this issue.

Repository structure

  • The playbooks are at the root of this repository. The playbooks name is playbook_*.yml.
  • The inventory file is inventory.ini
  • The variables are defined in the host_vars and group_vars directories
  • The directory templates has the jinja templates used by the playbooks
  • The directory roles has the roles used by the playbooks
  • The directory outputs has the playbooks output
  • The requirements file is requirements.txt
  • The Ansible config file is ansible.cfg

Network topology

3 EOS devices connected in a triangle topology and configured with EBGP

topology.png

arista_eos_automation_with_ansible's People

Contributors

ksator avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.