Automated network infrastructure management for Graphiant Network-as-a-Service (NaaS) offerings.
Refer Graphiant Docs to get started with Graphiant Network-as-a-Service (NaaS) offerings.
- Official Documentation: Graphiant Playbooks Guide <-> Graphiant Automation Docs
- Ansible Collection: Ansible Galaxy Collection - graphiant.naas
- Changelog: CHANGELOG.md - Version history and release notes
- Security Policy: SECURITY.md - Security best practices and vulnerability reporting
| Component | Description | Documentation |
|---|---|---|
| Ansible Collection | Ansible modules for Graphiant NaaS automation (v25.12.3) | π Documentation |
| Terraform Modules | Infrastructure as Code for cloud connectivity | π Documentation |
| CI/CD Pipelines | Automated testing, linting, building, and releasing | π GitHub |
| Docker Support | Containerized execution environment | π Documentation |
- Python 3.7+ (compatible with ansible-core 2.17, 2.18, 2.19, and 2.20)
- Ansible Core 2.17+
- Terraform v1.14+
# Clone the repository
git clone https://github.com/Graphiant-Inc/graphiant-playbooks.git
cd graphiant-playbooks
# Create virtual environment
python3.7 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r ansible_collections/graphiant/naas/requirements-ee.txt
# Install collection from source
ansible-galaxy collection install ansible_collections/graphiant/naas/ --force
# Or install from Ansible Galaxy
ansible-galaxy collection install graphiant.naasExample Playbook:
---
- name: Configure Graphiant network
hosts: localhost
gather_facts: false
vars:
graphiant_client_params: &graphiant_client_params
host: "{{ graphiant_host }}"
username: "{{ graphiant_username }}"
password: "{{ graphiant_password }}"
tasks:
- name: Configure LAN interfaces
graphiant.naas.graphiant_interfaces:
<<: *graphiant_client_params
interface_config_file: "interface_config.yaml"
operation: "configure_lan_interfaces"See the Ansible Collection README for complete documentation and Examples Guide for detailed usage examples.
- Idempotent Operations: All modules correctly report
changed: falsewhen no modifications occur - Structured Results: Manager methods return detailed results with
changed,created,skipped, anddeletedfields - Graceful Error Handling: Handles "object not found" errors gracefully in deconfigure operations
- Jinja2 Template Support: Configuration files support Jinja2 templating for dynamic generation
- Comprehensive Logging: Optional detailed logging for debugging and troubleshooting
- Automated Releases: GitHub Actions workflow for building, publishing, and creating releases
The collection can also be used as a Python library:
# Set PYTHONPATH for direct Python usage
export PYTHONPATH=$(pwd)/ansible_collections/graphiant/naas/plugins/module_utils:$PYTHONPATHfrom libs.graphiant_config import GraphiantConfig
config = GraphiantConfig(
base_url="https://api.graphiant.com",
username="user",
password="pass"
)
config.interfaces.configure_lan_interfaces("interface_config.yaml")See ansible_collections/graphiant/naas/tests/test.py for comprehensive Python library usage examples.
Deploy cloud connectivity infrastructure with Terraform:
# Azure ExpressRoute
cd terraform/gateway_services/azure
terraform init
terraform plan -var-file="../../configs/gateway_services/azure_config.tfvars"
terraform apply -var-file="../../configs/gateway_services/azure_config.tfvars"
# AWS Direct Connect
cd terraform/gateway_services/aws
terraform init
terraform plan -var-file="../../configs/gateway_services/aws_config.tfvars"
terraform apply -var-file="../../configs/gateway_services/aws_config.tfvars"
# GCP InterConnect
cd terraform/gateway_services/gcp
terraform init
terraform plan -var-file="../../configs/gateway_services/gcp_config.tfvars"
terraform apply -var-file="../../configs/gateway_services/gcp_config.tfvars"See the Terraform README for detailed setup instructions.
graphiant-playbooks/
βββ ansible_collections/graphiant/naas/ # Ansible collection (v25.12.3)
β βββ plugins/modules/ # Ansible modules (6 modules)
β βββ plugins/module_utils/ # Python library code
β βββ playbooks/ # Example playbooks
β βββ configs/ # Configuration templates
β βββ templates/ # Jinja2 templates
β βββ docs/ # Documentation
β βββ CHANGELOG.md # Version history
β βββ README.md # Collection documentation
β βββ _version.py # Centralized version management
βββ terraform/ # Terraform modules
β βββ gateway_services/ # Cloud gateway services (AWS/Azure/GCP)
β βββ edge_services/ # Edge services
βββ scripts/ # Utility scripts
β βββ build_collection.py # Collection build script
β βββ bump_version.py # Version bumping script
β βββ validate_collection.py # Collection validation script
β βββ build_docsite.sh # Documentation build script
βββ .github/workflows/ # GitHub Actions workflows
β βββ lint.yml # Linting workflow
β βββ test.yml # Test workflow (multi-version testing)
β βββ build.yml # Build workflow
β βββ release.yml # Release workflow (auto-tag/release)
β βββ README.md # GitHub documentation
βββ SECURITY.md # Security policy
βββ CONTRIBUTING.md # Contribution guidelines
βββ CODE_OF_CONDUCT.md # Code of conduct
βββ README.md # This file
We welcome contributions! See CONTRIBUTING.md for:
- Development setup
- Code standards
- Testing requirements
- Pull request process
- Branch protection requirements
- GPG signing requirements
See CODE_OF_CONDUCT.md for our community guidelines.
This project is licensed under the GNU General Public License v3.0 or later (GPLv3+) - see the LICENSE file for details.
- Official Documentation: Graphiant Playbooks Guide <-> Graphiant Automation Docs
- Changelog: CHANGELOG.md - Version history and release notes
- Security: SECURITY.md - Security policy and vulnerability reporting
- Issues: GitHub Issues
- Email: support@graphiant.com
Made with β€οΈ by the Graphiant Team