This collection is to provide an easier way to interact with Juniper

Overview

Ansible Collection - cremsburg.apstra

N|Solid

Overview

The goal of this collection is to provide an easier way to interact with Juniper's Apstra solution. While nothing will stop you from using the built-in module, you may find that working with pre-packaged modules can help simplify the development of your playbook, or it may just be easier to support as a team.

📋 Ansible version compatibility

There are significant changes to Ansible within version 3.x, and while those changes get worked out we will continue to test for Ansible 2.10.x.

It is very likely that something will break on Ansible 3.x versions as of this pre-release version of the project.

⚙️ Batteries Included

Here is a short list of modules included within the collection, expect feature parity with the Swagger before this project hits version 0.1.0

Name Description
cremsburg.apstra.blueprint Manage Blueprints
cremsburg.apstra.design Manage the Design elements
cremsburg.apstra.resources Manage the Resources elements

🚀 Executing the playbook

After installing the collections, you can call the modules by using their full name path.

test.yaml

---
- hosts: localhost
  gather_facts: False
  become: False
  tasks:
    
    - name: Manage an IP Pool Resource with two prefixes
      cremsburg.apstra.resources:
        # define server connectivity options
        server: apstra.dmz.home
        api_token: "{{ api_token }}"

        # define resource allocations
        display_name: "cicd_test"
        type: "ip-pool"
        subnets:
          - "100.1.1.0/24"
          - "100.1.2.0/24"

        # state whether you want to create or delete this resource
        state: present

Then simply run your playbook

ansible-playbook test.yaml

If you used Ansible Vault to encrypt your secrets, you need to append the --ask-vault-pass to your command.

⚠️ Very Important! ⚠️

Please make sure to manage your sensative information carfully. While the modules support the parameter of api_key, this should never be statically entered with your token in clear text.

Here are better alternatives:

Manage your API token as an environmental

export APSTRA_API_TOKEN='YOUR_PRIVATE_KEY_HERE'

you can also use APSTRA_API_KEY, if you prefer

Manage your API token as a secret with Ansible Vault

create a file to store your API token in

$ vim vault.yaml

api_token: "MY_APSTRA_API_TOKEN_HERE"

encrypt the new file

ansible-vault encrypt vault.yml

and now you'll need to pass your vault password when using the playbook

ansible-playbook --ask-vault-pass test.yaml

Development

Want to contribute? Great!

Submit a PR and let's work on this together :D

Owner
Calvin Remsburg
check out the Stars tab for some much needed organization
Calvin Remsburg
Minos-python - A framework which helps you create reactive microservices in Python

minos-python Summary [TODO] Packages minos-microservice-aggregate minos-microser

Minos Framework 380 Jan 04, 2023
My solutions for Advent of Code 2021 🌟🎄

🌟 Advent of Code 2021 🎄 My solutions for Advent of Code 2021. About · What is Advent of Code? · Contents · Usage · Table of puzzles (TODO: add final

Amanda P. Pinha 2 Dec 05, 2022
Odoo modules related to website/webshop

Website Apps related to Odoo it's website/webshop features: webshop_public_prices: allow configuring to hide or show product prices and add to cart bu

Yenthe Van Ginneken 9 Nov 04, 2022
A script where you execute a script that generates a base project for your gdextension

GDExtension Project Creator this is a script (currently only for linux) where you execute a script that generates a base project for your gdextension,

Unknown 11 Nov 17, 2022
Heads Down Application for Mac OSX

Heads Down A Mac app that lives in your ribbon—with a click of the mouse, temporarily block distracting websites and applications to encourage "heads

20 Mar 10, 2021
The purpose of this tool is to check RDP capabilities of a user on specific targets.

RDPChecker The purpose of this tool is to check RDP capabilities of a user on specific targets. Programming concept was taken from RDPassSpray and thu

Hypnoze57 57 Aug 04, 2022
Store Simulation

Almacenes Para clonar el Repositorio: Vaya a la terminal de Linux o Mac, o a la cmd en Windows y ejecute:

Johan Posada 1 Nov 12, 2021
Credit Card Fraud Detection

Credit Card Fraud Detection For this project, I used the datasets from the kaggle competition called IEEE-CIS Fraud Detection. The competition aims to

RayWu 4 Jun 21, 2022
🎉 🎉 PyComp - Java Code compiler written in python.

🎉 🎉 PyComp Java Code compiler written in python. This is yet another compiler meant for babcock students project which was created using pure python

Alumona Benaiah 5 Nov 30, 2022
This is a simple web interface for SimplyTranslate

SimplyTranslate Web This is a simple web interface for SimplyTranslate List of Instances You can find a list of instances here: SimplyTranslate Projec

4 Dec 14, 2022
Oblique Strategies for Python

Oblique Strategies for Python

Łukasz Langa 3 Feb 17, 2022
Fork of pathlib aiming to support the full stdlib Python API.

pathlib2 Fork of pathlib aiming to support the full stdlib Python API. The old pathlib module on bitbucket is in bugfix-only mode. The goal of pathlib

Jazzband 73 Dec 23, 2022
🤞 Website-Survival-Detection

- 🤞 Website-Survival-Detection It can help you to detect the survival status of the website in batches and return the status code! - 📜 Instructions

B0kd1 4 Nov 14, 2022
⚡KiCad library containing footprints and symbols for inductive analog keyboard switches

Inductive Analog Switches This library contains footprints and symbols for inductive analog keyboard switches for use with the Texas Instruments LDC13

Elias Sjögreen 3 Jun 30, 2022
Show my read on kindle this year

Show my kindle status on GitHub

yihong 26 Jun 20, 2022
A simply program to find active jackbox.tv game codes

PeepingJack A simply program to find active jackbox.tv game codes How does this work? It uses a threadpool to loop through all possible codes in a ran

3 Mar 20, 2022
A simple, light-weight and highly maintainable online judge system for secondary education

y³OJ a simple, light-weight and highly maintainable online judge system for secondary education 一个简单、轻量化、易于维护的、为中学信息技术学科课业教学设计的 Online Judge 系统。 Onlin

20 Oct 04, 2022
Free APN For Python

Free APN For Python

XENZI GANZZ 4 Apr 22, 2022
Blender Add-on That Provides Quick Access to Render Controls

Blender Render Buttons Blender Add-on That Provides Quick Access to Render Controls A Blender 3.0 compatablity update of Blender2.8x-RenderButton v0.0

Don Schnitzius 3 Oct 18, 2022
Penelope Shell Handler

penelope Penelope is an advanced shell handler. Its main aim is to replace netcat as shell catcher during exploiting RCE vulnerabilities. It works on

293 Dec 30, 2022