# dell-networking/ansible-dellos-examples architecture

> Architecture diagram of the GitHub repository dell-networking/ansible-dellos-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dell-networking/ansible-dellos-examples
- Repository: https://github.com/dell-networking/ansible-dellos-examples

## Overview

This repository is a collection of sample Ansible playbooks and roles that demonstrate how to manage and configure Dell EMC Networking devices using various Dell-exclusive Ansible modules. The playbooks are organized by operating system version (OS6, OS9, OS10) as well as by topology examples (for example, “clos-fabric” and “vxlan-leaf-spine”). In effect, the project serves both as an educational reference (with examples on running “facts”, “command”, and “config” modules) and as a template for automating network device configuration and telemetry setups.

##### Main Components
- Ansible Control Node: Represent the central machine where Ansible is installed; this is responsible for executing playbooks using the inventory file.
- Inventory: The “inventory.yaml” file holds the device IPs and connection details.
- OS-Specific Playbooks:
– OS6 directory: Contains playbooks for collecting facts (dellos6_facts), executing commands (dellos6_command), and configuring devices (dellos6_config).
– OS9 directory: Similar structure with playbooks and a special “roles” directory (e.g., for BMP tasks).
– OS10 directory: The most complex component; it includes configuration files, telemetry setups (with Prometheus, Grafana, SNMP exporter), host and group variables, and several roles to manage various configuration tasks (AAA, ACL, BGP, interface, etc.).
- Topology/Example Configurations:
– “clos-fabric” and “vxlan-leaf-spine”: These directories demonstrate complete fabric configurations (including leaf-spine networking, device role definitions, and inventory grouping).
- Roles and Templates: Under each OS’s “roles” subdirectory (especially in OS10), there are role collections that capture best practices using Dell modules (for AAA, BGP, interfaces, image-install, etc.). Templates written in Jinja2 also indicate dynamic configuration.

##### Relationships and Interactions
- For each OS directory, represent a component that receives playbook commands from the control node. For example:
– OS6, OS9, OS10 should each be depicted as separate modules that trigger actions (fetching facts, executing show commands, applying configurations) on corresponding network devices.
- Within the OS10 component, delineate submodules:
– “leaf-spine”: Represents a more detailed fabric deployment, including unique configuration tasks, pod creation, and telemetry assemblies.
– “telemetry”: Show that this contains provisioning for Prometheus and Grafana; illustrate that Prometheus collects data and Grafana displays dashboards.
- That roles (e.g., dellos-aaa, dellos-bgp, dellos-interface, etc.) are libraries that encapsulate the logic of configuration and are imported by the main playbooks.

##### Architectural Patterns and Design Principles
- Modularization: Emphasize that the project’s structure separates OS-specific configurations and leverages roles for repeatable tasks.
- Separation of Concerns: Different directories (OS6, OS9, OS10) show clear isolation of logic for different networking OS versions, while subdirectories like “leaf-spine” and “clos-fabric” contextualize specific network topologies.
- Extensibility: The roles and templating system (using Jinja2) promote ease of extension and customization.
- Telemetry Integration: In the OS10/leaf-spine directory, note the integration with containerized telemetry (Prometheus, Grafana, SNMP exporter), which is crucial for monitoring network performance.

##### Relevant Technologies
- Ansible (with dependencies on version-specific modules).
- Jinja2 for templating configurations.
- Docker Compose configurations in telemetry (for Grafana deployments).
- Prometheus (for metrics collection) and SNMP exporters.
- YAML configuration files are used throughout for playbooks and variable definitions.
- The Dell EMC Networking modules themselves, as distributed roles.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Ansible Control Node"]:::control
    B["Inventory (inventory.yaml)"]:::inventory
    subgraph "Control Layer"
        A
        B
    end

    subgraph "Playbook Layer"
        C["OS6 Playbooks"]:::playbook
        D["OS9 Playbooks"]:::playbook
        F["OS10 Playbooks/Configurations"]:::playbook
        J["Topology: clos-fabric"]:::topology
        K["Topology: vxlan-leaf-spine"]:::topology
    end

    subgraph "OS10 Leaf-Spine"
        G["Leaf-Spine Fabric Deployment"]:::playbook
        N["Leaf-Spine Inventory"]:::inventory
        H["Telemetry Integration"]:::telemetry
        I["Roles & Templates (OS10)"]:::role
        L["Templates (OS10)"]:::role
    end

    subgraph "OS9 Roles"
        E["OS9 Roles"]:::role
    end

    %% Connections between layers
    A -->|"references"| B
    A -->|"executes"| C
    A -->|"executes"| D
    A -->|"executes"| F
    A -->|"executes"| J
    A -->|"executes"| K

    D -->|"includes"| E
    F -->|"triggers"| G
    G -->|"uses"| N
    G -->|"includes"| H
    G -->|"includes"| I
    I -->|"contains"| L

    %% Click Events
    click A "https://github.com/dell-networking/ansible-dellos-examples/blob/master/inventory.yaml"
    click B "https://github.com/dell-networking/ansible-dellos-examples/blob/master/inventory.yaml"
    click C "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS6"
    click D "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS9"
    click E "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS9/roles/dellos-bmp"
    click F "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS10"
    click G "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS10/leaf-spine"
    click N "https://github.com/dell-networking/ansible-dellos-examples/blob/master/OS10/leaf-spine/inventory.yaml"
    click H "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS10/leaf-spine/config/telemetry"
    click I "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS10/leaf-spine/roles"
    click J "https://github.com/dell-networking/ansible-dellos-examples/tree/master/clos-fabric"
    click K "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS10/vxlan-leaf-spine"
    click L "https://github.com/dell-networking/ansible-dellos-examples/tree/master/OS10/leaf-spine/templates"

    %% Styles
    classDef control fill:#f9f,stroke:#333,stroke-width:2px;
    classDef inventory fill:#ccf,stroke:#333,stroke-width:2px;
    classDef playbook fill:#cfc,stroke:#333,stroke-width:2px;
    classDef telemetry fill:#fcf,stroke:#333,stroke-width:2px;
    classDef role fill:#cff,stroke:#333,stroke-width:2px;
    classDef topology fill:#ffc,stroke:#333,stroke-width:2px;
```
