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.
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.
-
Join the Ansible forum:
- Get Help: get help or help others.
- Posts tagged with 'juniper': subscribe to participate in collection-related conversations.
- Ansible Network Automation Working Group: by joining the team you will automatically get subscribed to the posts tagged with network.
- Social Spaces: gather and interact with fellow enthusiasts.
- News & Announcements: track project-wide announcements including social events.
-
The Ansible Bullhorn newsletter: used to announce releases and important changes.
For more information about communication, see the Ansible communication guide.
This collection has been tested against following Ansible versions: >=2.15.
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.
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
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
- name: Connect to Apstra
juniper.apstra.authenticate:
api_url: "https://my-apstra/api"
username: "admin"
password: "password"
logout: false
register: auth
- name: Run apstra_facts module
juniper.apstra.apstra_facts:
gather_network_facts: 'all'
available_network_facts: true
auth_token: "{{ auth.token }}"
register: apstra_facts
- name: Create/get blueprint
juniper.apstra.blueprint:
body:
label: "test_blueprint"
design: "two_stage_l3clos"
lock_state: "locked"
auth_token: "{{ auth.token }}"
register: bp
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.
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
Release notes are available here.
- Ansible network resources
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Community code of conduct
GNU General Public License v3.0 or later.
See LICENSE to see the full text.