Skip to content

Latest commit

 

History

History
156 lines (106 loc) · 7.64 KB

File metadata and controls

156 lines (106 loc) · 7.64 KB

Juniper Networks

Juniper Networks Apstra Ansible Collection

This repository contains the Juniper Apstra Ansible Collection, which provides a set of Ansible modules and roles for network management via the Juniper Apstra platform.

This collection has been validated on Juniper Apstra version 5.0.

Support

As a Red Hat Ansible Certified Content, this collection is entitled to support through Ansible Automation Platform (AAP).

If a support case cannot be opened with Red Hat and the collection has been obtained either from Galaxy or GitHub, there is community support available at no charge.

You can join us on #network:ansible.com room or the Ansible Forum Network Working Group.

For more information you can check the communication section below.

Communication

For more information about communication, see the Ansible communication guide.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.15.

Included Content

Modules

Name Description
juniper.apstra.apstra_facts Collect network facts from Apstra
juniper.apstra.authenticate Authenticate to Apstra API
juniper.apstra.blueprint Manage blueprints
juniper.apstra.endpoint_policy Manage endpoint policies
juniper.apstra.resource_group Manage resource groups
juniper.apstra.routing_policy Manage routing policies
juniper.apstra.security_zone Manage security zones
juniper.apstra.tag Manage tags
juniper.apstra.virtual_network Manage virtual networks

Click the Content button to see the list of content included in this collection.

Installation

You can install the Juniper Networks Apstr collection with the Ansible Galaxy CLI:

ansible-galaxy collection install juniper.apstra

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: juniper.apstra

You can ensure that the required packages are installed via pip. For example, if your collection is installed in the default location:

pip install -r ~/.ansible/collections/ansible_collections/juniper/apstra/requirements.txt

Usage

You can call modules by their Fully Qualified Collection Namespace (FQCN), such as juniper.apstra.authenticate. The following example plays show how to log in to Apstra, create a blueprint and gather facts.

The collection is simply an Ansible interface to specific Apstra API. This is why

Login

- name: Connect to Apstra
  juniper.apstra.authenticate:
    api_url: "https://my-apstra/api"
    username: "admin"
    password: "password"
    logout: false
  register: auth

Gather facts

- name: Run apstra_facts module
  juniper.apstra.apstra_facts:
    gather_network_facts: 'all'
    available_network_facts: true
    auth_token: "{{ auth.token }}"
  register: apstra_facts

Create blueprint

- name: Create/get blueprint
  juniper.apstra.blueprint:
    body:
      label: "test_blueprint"
      design: "two_stage_l3clos"
    lock_state: "locked"
    auth_token: "{{ auth.token }}"
  register: bp

Contributing to this collection

We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the Juniper Networks Apstr collection repository. See Contributing to Ansible-maintained collections for complete details.

You can also join us on:

See the Ansible Community Guide for details on contributing to Ansible.

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Release Notes

Release notes are available here.

Roadmap

More Information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.