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

Examples of Using Ansible with Junos Devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  • Network vendors: Arista, Cisco, Cumulus, Nokia
  • Cloud technologies: Amazon Web Server, OpenStack, VMWare
  • Operating systems: Ubuntu, Red Hat Enterprise Linux

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

About

Examples of Using Ansible with Junos Devices

License:Apache License 2.0