Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

Junos Automation with Ansible

‎05-28-2018 01:00 PM

Hello Experts,

 

I am new to the concept of using Ansible for Junos automation. I have a couple of queries about this topic.

I have a few Juniper devices(Switches and Firewalls) running in the production network. I have installed a test Ansbile server and played around with it for a while.

 

For taking this to the production, how do I start? For example, if  I have 10 devices, do I have to write 10 different YAML files to manage each device?

 

Also I understand that I can run 'juniper_junos_config' module and get the current config and then convert it to a YAML file and save it.

But how do I do the actual config changes with 'juniper_junos_config'? Do I have to keep the junos config in a separate file and then call that file into the YAML play-book OR do I have to write the junos set command with the the YAML itself? What is the most preferred way?

1 REPLY 1
Junos Automation (Scripting)

Re: Junos Automation with Ansible

‎05-29-2018 03:18 AM

Have you seen this guide?

 

https://forums.juniper.net/t5/Day-One-Books/Day-One-Automating-Junos-with-Ansible/ba-p/319512

 

I would start by deploying ssh keys and setting up regular backups of your configurations using Ansible.

 

From there, look for real world for your network cases where you need to make regular changes, config verifications or monitoring tasks.  Then automate those specific functions.

 

Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
http://puluka.com/home
Feedback