How zjleblanc/ansible-network-mgmt works
Project type and purpose
• This is an open‐source network automation tool built with Ansible.
• Its purpose is to manage/configure network devices, generate reports, and integrate with external services (AWS, Dynatrace SNMP, ServiceNow CMDB, Slack).
File structure
• Top‐level “playbooks”: core orchestration scripts (compliance reports, interactive reports, Dynatrace→SNOW, configs).
• “collections” & “roles”: reusable code units (modules, tasks, defaults, meta, filters).
• “demos”, “workshop-addons”, “summit-connect”: specialized examples, labs, and network-as-code patterns.
• “inventories”: static & dynamic host definitions (AWS EC2 dynamic inventory plugin).
• “filter_plugins”: Python logic for custom data transformations.
• “vars”, “templates”, “tasks”: variable files and Jinja2 templates used by playbooks and roles.
README for insights
• Confirms major playbooks and their use cases.
• Mentions external integrations: Dynatrace SNMP, ServiceNow CMDB, AWS EC2 inventory.
• Notes troubleshooting hints around SSH (Paramiko) and device authentication.
Main components
a. Control Plane (Ansible Engine running on a Control Node)
– Playbooks directory
– Roles & Collections (with tasks, defaults, meta)
– Filter_plugins & custom modules
– Templates & variable files
– Dynamic/Static Inventories
b. External Systems & Services
– Network Devices (routers, switches, firewalls) accessed via SSH/Paramiko
– AWS EC2 API for dynamic inventory
– Dynatrace SNMP feed
– ServiceNow CMDB REST API
– Slack Webhook for notifications
c. Optional Workshop & Demo Layers
– Demos (panos examples)
– Workshop-addons (e.g. EVE-NG integrations)
– Summit-connect (network-as-code definitions & playbooks)
Relationships and interactions
• The Control Plane reads inventories and playbooks →
triggers connection plugins →
pushes modules & templates via SSH to Network Devices.
• When running Dynatrace→SNOW playbooks, Ansible fetches SNMP data, transforms it, then calls ServiceNow API to populate CMDB.
• The AWS EC2 dynamic inventory plugin queries AWS API at runtime to discover hosts.
• Slack notifications are sent via HTTP to Slack Webhooks at the end of playbook runs.
Architectural patterns & design principles
• Separation of concerns: playbooks orchestrate, roles/collections encapsulate reusable logic, filter_plugins handle data transformation.
• Declarative, idempotent tasks (Ansible’s core principle).
• Modular inventory (static files under “inventories” + dynamic AWS plugin).
• Extensibility: new devices or services can be added by dropping in new roles/collections or filter_plugins.
Technologies & frameworks
• Ansible (Engine, CLI, YAML playbooks)
• Python (filter_plugins, modules)
• Jinja2 (templates)
• SSH/Paramiko (connections)
• REST APIs (ServiceNow, Slack, AWS)
• SNMP (Dynatrace integration)
Essential elements checklist
[ ] Ansible Control Node with sub‐components (playbooks, roles, collections, filters, inventory)
[ ] Static Inventory files & AWS dynamic inventory plugin
[ ] Connection path to Network Devices via SSH/Paramiko
[ ] Integration paths to Dynatrace SNMP, ServiceNow API, Slack Webhook
[ ] Demo/workshop layers (optional, can be collapsed under “Examples”)