Image may be NSFW.
Clik here to view.Automation is a growing technology in enterprise IT departments. The ability to automate hundreds of steps for developing, building, deploying, and scaling applications and servers is a huge win for many of our fellow engineers. Both DevOps and SysOps are loving the new power that it brings. But, what about NetOps? Is there any love there? Well, there is now, thanks to a few developers at Juniper Networks, Ansible, and others.
In this video, I will show you how to deploy a configuration to Junos devices using Ansible. The configuration is just a simple single-line configuration, but I kept it simple for brevity only. The configuration could be as complex as you need it to be.
There are a few simple requirements to be fulfilled on your Ansible Control system.
$ sudo pip install ncclient $ sudo pip install junos-eznc $ sudo ansible-galaxy install Juniper.junos
You also need to have NETCONF enabled on your Juniper devices:
# set system services netconf ssh
Once that’s done, you can start pushing configurations, deploying software, and writing your Ansible Playbooks to your hearts desire! Here is the playbook that I created for the example:
--- - hosts: lab_juniper_ro roles: - Juniper.junos connection: local gather_facts: no - name: Deploy NTP Server junos_install_config: host={{inventory_hostname}} user=aaron.paxson file=resources/config-user.set overwrite=false logfile=logs/deploy-user.log
See below the video for reference material, documentation, and guides.
Useful links for more information: