O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

In step 1, we're making sure that we've got Python 2.7 available. Even though this isn't the latest and greatest version of Python, it is unfortunately the case that not all software is compatible and ready for the Python 3 change which breaks some syntactic features. Ansible 2.x has recently become Python 3 capable, and the Juniper PyEZ framework works with Python 3.5 and above, but at the time of writing, some of the other Juniper Ansible modules that we'll want to look at have not been certified as compatible with Python 3. So for the purpose of this recipe, we'll make use of Python 2.7.

In step 2, we use the built-in Python package manager, pip, to install Ansible. It is a complex package and has many dependencies on other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required