Giter Site home page Giter Site logo

emomeni / cisco_facts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automateyournetwork/cisco_facts

2.0 0.0 0.0 107 KB

Ansible playbooks that use the IOS / NXOS Facts modules and Genie parsed commands to transform RAW JSON into business-ready documentation

License: GNU General Public License v3.0

Python 14.74% HTML 85.26%

cisco_facts's Introduction

Cisco Facts and Genie Parsed Commands to Business-Ready Documentation Ansible Playbooks

published

Written by John Capobianco

Ansible has several "Facts" modules - ios_facts and nxos_facts - that capture data and transform it into JavaScript Object Notation (JSON) which we then use Jinja2 Templates to transform again into business-ready documentation

Cisco also has release Genie parsers - combined with Ansible you can first run an IOS / NXOS show command, then with Genie, parse that command into JSON. Once you have the JSON you can transform it with Jinja2 into CSV / MD!

Prerequisites

  1. Install Ansible
pip install --user ansible
  1. Check version of Ansible
ansible --version

ansible 2.9.1
  1. Install JMESPATH
pip install --user jmespath
  1. Install Genie
pip install genie
  1. Install node.js 12
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
  1. Install GCC
sudo yum install -y gcc-c++ make
  1. Install Node.js
sudo yum install -y nodejs
  1. Install Mark Map
npm install markmap-lib -g  
  1. Clone the Repository
git clone https://github.com/automateyournetwork/Cisco_Facts

IOS and NXOS Facts

  1. Update your hosts to match your CAMPUS or DC first. Make sure you have SSH connectivity from the Ansible host.

  2. Run the ansible-playbook of choice

  3. Supply Username

  4. Supply Secret

  5. Git add / commit / push created output files

  6. Check output .CSV files

  7. Check output .MD files

  8. Check output .HTML files

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.