apstra

9Modules1Plugin

Overview

Description

This collection provides modules to interact with Apstra.

Readme

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

NameDescription
juniper.apstra.apstra_factsCollect network facts from Apstra
juniper.apstra.authenticateAuthenticate to Apstra API
juniper.apstra.blueprintManage blueprints
juniper.apstra.endpoint_policyManage endpoint policies
juniper.apstra.resource_groupManage resource groups
juniper.apstra.routing_policyManage routing policies
juniper.apstra.security_zoneManage security zones
juniper.apstra.tagManage tags
juniper.apstra.virtual_networkManage 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:

  • IRC - the #ansible-network irc.libera.chat channel
  • Slack - https://ansiblenetwork.slack.com

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.

Certification

Product
2.4
2.5
DocumentationDependencies
No dependencies
There are currently no dependencies for this collection.
View in Automation Hub
Red Hat logoLinkedInYouTubeFacebookTwitter

Platforms

Products & services

Try, buy, sell

Help

About Red Hat Ecosystem Catalog

The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2025 Red Hat