Juniper/Intro-to-Using-Ansible-with-Junos-OS

Name: Intro-to-Using-Ansible-with-Junos-OS

Owner: Juniper Networks

Description: Examples of Using Ansible with Junos Devices

Created: 2017-06-28 16:50:22.0

Updated: 2018-03-28 18:15:26.0

Pushed: 2017-09-13 17:55:21.0

Homepage: null

Size: 3942

Language: null

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

What is Junos OS?

Junos OS is an operating system on Juniper Networks devices (both physical and virtual). It comes with a command line interface (cli) that makes running tasks on Junos devices quick and easy. For more information on Junos OS, click here

What is Ansible?

Ansible is an automation framework that is used for automating tasks. Ansible supports a wide range of integrations. The most commonly used ones are infrustructure, networks, containers, cloud, and devop tools. To learn more about Ansible check out their website.

Why use Ansible?

Ansible is a great tool if you need to make changes and/or execute specific tasks on more than one device. Instead of having to do a specific task on multiple machines one at a time, you can do that task on all of them at once by executing one script (playbook). Also, if you have multiple tasks you can combine them into one playbook. This saves a lot of time for the developer and minimizes the chance of any errors.

Ansible and Junos OS

Juniper Networks specifically uses Ansible to automate network infrustructure. Although one might think that this is a daunting task, it is actually something anyone can do even without a strong programming background. In this guide, we will be showing how to use Ansible with Junos.

Although Ansible is written in Python, knowing Python is not necessary to use Ansible because the automation tasks are written in the human readable language YAML. Click here to get a brief introduction to YAML. These YAML files are called playbooks. Users execute the playbook against a set of hosts in an inventory file to automate the job. To read a short intro on playbooks click here. Playbooks also make use of the Jinja2 templating system. All these tools together make Ansible a very easy to use, dynamic tool for automating jobs.

Ansible's Interoperability

Ansible can be used with other vendors and/or software as well. Some include:

Wiki Contents

  1. Juniper and Ansible

  2. Technical use cases

  3. Installing Ansible

  4. Playbooks

    i. Initial Installation - install a configuration on any Junos OS device via console

    ii. Health Checks - get some facts about your device like the serial number, hostname, and more

    iii. Provisioning - add two lines to the existing configuration and save the changes

License

Apache 2.0

Contributors

Noa Shadmon, Jessica Garrison


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.