How Juniper Networks uses Ansible
Yash Indane
Tech Enthusiast | Integrating Technologies | 1x AWS Certified | 6x Microsoft Certified | Cloud Computing | DevOps
Juniper Networks is an industry leader in network innovation. Juniper creates innovative technologies that help customers connect their ideas, compete and thrive in an ever-changing world.
Ansible is an IT automation framework that is used for infrastructure configuration management. An Ansible module models a specific resource on a managed node and ensures that the resource is in a specific state. You can execute individual modules on remote hosts to perform ad-hoc tasks, or you can execute modules through playbooks.
Ansible and Juniper Networks provide collections of Ansible modules that you can use to perform operational and configuration tasks on devices running Junos OS. Starting in Ansible Release 2.1, Ansible natively includes a number of core modules that can be used to manage devices running Junos OS.
The most common applications of automation and orchestration in the management and provisioning of IT resources at Juniper Networks include :
- Configuration automation
- Test-driven networking
- Continuous compliance
Ansible for Junos OS Modules
Juniper Networks provides a collection of modules in the Juniper.junos role, which is hosted on the Ansible Galaxy website . Both the Ansible core modules and Ansible Galaxy modules for Junos OS can coexist on the same platform. For brevity, references to Ansible for Junos OS modules include both the Ansible core and Ansible Galaxy modules for Junos OS.
Typically, the control machine sends a module to a managed node, where it is executed and then removed. In this scenario, the managed nodes must have the ability to execute the Ansible modules. Generally, Python is required on the managed nodes, because most Ansible modules are written in Python.
To run Ansible modules locally on the control machine, include --connection=local when executing individual modules, or include connection: local in your Ansible playbook. If a playbook uses the Juniper.junos modules, the playbook must also include the Juniper.junos role.
For example, the following command executes the junos_facts Ansible core module to retrieve device facts from hosts in inventory group dc1.
user@host$ ansible --connection=local -i hosts.ini dc1 -m junos_facts
Ansible Core Modules for Junos OS
Starting in Ansible Release 2.1, the Ansible core modules for Junos OS are available as part of the Ansible software.
Some of the modules are:
Ansible Galaxy Modules for Junos OS
Starting in Ansible for Junos OS Release 2.0.0, the Juniper.junos role includes an enhanced set of modules. Each new module replaces the functionality of one or more existing modules. The enhanced modules support a common set of connection and authentication parameters, aliases that enable you to specify the same connection and authentication-related options as the core modules, and the ability to specify the parameters inside a provider dictionary.
Cloud Technical Solutions Engineer @ Google
4 年Great Study ??
System & Network Administrator | CCNP | Azure | VMware | Security | AWS | Red Hat | Ansible | Docker | Python
4 年Nice information