Giter VIP home page Giter VIP logo

ansible_netbox_demo's Introduction

Ansible NetBox Demo

Link to recording

Thanks to the Red Hat team that had the recording done of this. You can find it on YouTube at https://www.youtube.com/watch?v=GyQf5F0gr3w.

Most Recent Updates

I have moved all of the data that was previously configured to be added to NetBox within the 00_setup_netbox_devices.yml file to be configured in the all.yml. If looking to bootstrap your NetBox environment, this is the main information that will need to get updated.

Important Note

This is NOT meant to be run constantly in your environment. Please do not use as such. This is a bootstrapping setup, to get you running. The intent of NetBox is to become the Source of Truth for your environment. If all you are doing is constantly updating NetBox from your devices, then the source of truth is the network device, not NetBox. Please be working to get your environment to the state that you have a Source of Truth that is NOT your device.

Start

To setup NetBox, checkout https://netbox.readthedocs.io Setup an API Key in the upper right admin panel Generate an environment of devices to use

Requirements

  1. NetBox Installation
  2. Docker Desktop on system
  3. If running on Windows, you do not have make. The Makefile is just shortcuts to be used. Take a look at the Makefile for the exact commands that replace the specific make commands.

How to

  1. Setup NetBox (see the beginning)
  2. Setup a new file named .env that contains information about your NetBox environment for the container. See below for example config
  3. Update your group_vars/all.yml, group_vars/ and host_vars/ accordingly with credentials to connect to the devices, see below for example config
  4. Create a container - make build
  5. Enter the container - make cli
  6. Setup NetBox with executing ansible-playbook 00_setup_netbox_devices.yml
  7. Setup Devices Into Netbox ansible-playbook 01_setup_devices.yml -i start_inventory replace start_inventory with whatever your static inventory file is
  8. Setup Interfaces using dynamic inventory ansible-playbook 02_setup_interfaces.yml -i netbox_inventory.yml
  9. Run the audit ansible-playbook 03_audit_netbox.yml -i netbox_inventory.yml where you have updated the information in the netbox_inventory.yml file

ENV File setup

NETBOX_API_KEY=<NetBox Key>
NETBOX_URL=<URL of NetBox>

Group Vars, Host Vars

---
ansible_user: <username>
ansible_password: <password>
ansible_network_os: <corresponding Ansible OS>

hostvars will only contain information overriding data points. In the example, the only thing set in the host vars section is:

---
rack_location: 41

URLs

Helpful URLs have a few other links that may be helpful.

ansible_netbox_demo's People

Contributors

jvanderaa 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.