# sdesous/infra_ansible architecture

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

- Interactive diagram: https://gitdiagram.com/sdesous/infra_ansible
- Repository: https://github.com/sdesous/infra_ansible

## Overview

##### Main Components

a) Host System Layer:
- Alpine Linux Host
- Podman (Rootless) Container Runtime
- Samba Server
- Python3 Environment

b) Container Management Layer:
- Ansible Control System
- Podman Pod Structure
- Service Init System

c) Application Pods:
- wireguard_pod
- ombi_pod
- vaultwarden_pod
- nextcloud_pod
- haproxy_pod
- transfer_pod
- mealie_pod

d) Storage Layer:
- Volume Management
- Backup System
- SMB Shares

##### Specific Elements

a) Infrastructure Components:
**[Alpine Linux Host]**
- ↓
**[Podman Rootless Runtime]**
- ↓
**[Pod Management Layer]**

b) Pod Structure (Example for ombi_pod):
**[ombi_pod]**
- Jellyfin
- Ombi
- Flaresolverr
- Jackett
- Transmission
- Sonarr
- Radarr
- Lidarr
- Homarr

c) Storage Structure:
**[Volume Management]**
- /volumes
- /Backup_PC
- /Media
- /Nextcloud
- /Transfers

##### Additional Details

- Ansible control flow
- Service dependencies
- Network segmentation
- User access points
- Backup/restore paths

Use a hierarchical layout with:
- Clear component separation
- Logical grouping of related services
- Explicit connection paths
- Version/update flow indicators

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef host fill:#f5f5f5,stroke:#333
    classDef runtime fill:#d4e6f1,stroke:#333
    classDef pod fill:#d5f5e3,stroke:#333
    classDef app fill:#fae5d3,stroke:#333
    classDef storage fill:#e8daef,stroke:#333
    classDef control fill:#fdedec,stroke:#333
    classDef security fill:#fff3e6,stroke:#333

    %% Host Layer
    Host[Alpine Linux Host]:::host
    Podman[Podman Rootless Runtime]:::runtime
    Samba[Samba Server]:::host
    Python[Python3 Environment]:::host

    %% Control Layer
    AnsibleControl[Ansible Control System]:::control
    PodManagement[Pod Management]:::control
    UserManagement[Container User Management]:::control
    UpdateSystem[System Update Management]:::control

    %% Pod Layer
    subgraph Pods
        WireguardPod[Wireguard Pod]:::pod
        OmbiPod[Ombi Pod]:::pod
        VaultwardenPod[Vaultwarden Pod]:::pod
        NextcloudPod[Nextcloud Pod]:::pod
        HAProxyPod[HAProxy Pod]:::pod
        TransferPod[Transfer Pod]:::pod
        MealiePod[Mealie Pod]:::pod
    end

    %% Storage Layer
    subgraph Storage
        Volumes[Volume Management]:::storage
        Backup[Backup System]:::storage
        SMBShares[SMB Shares]:::storage
    end

    %% Ombi Pod Services
    subgraph OmbiServices
        Jellyfin[Jellyfin]:::app
        Ombi[Ombi]:::app
        Flaresolverr[Flaresolverr]:::app
        Jackett[Jackett]:::app
        Transmission[Transmission]:::app
        Sonarr[Sonarr]:::app
        Radarr[Radarr]:::app
        Lidarr[Lidarr]:::app
        Homarr[Homarr]:::app
        PiHole[PiHole]:::app
    end

    %% Relationships
    Host --> Podman
    Host --> Samba
    Host --> Python
    Python --> AnsibleControl
    AnsibleControl --> PodManagement
    AnsibleControl --> UserManagement
    AnsibleControl --> UpdateSystem
    PodManagement --> Pods
    Podman --> Pods
    Pods --> Storage
    OmbiPod --> OmbiServices
    Samba --> SMBShares
    
    %% Click Events
    click AnsibleControl "https://github.com/sdesous/Infra_Ansible/blob/main/playbook.yaml"
    click Samba "https://github.com/sdesous/Infra_Ansible/tree/main/roles/samba"
    click PodManagement "https://github.com/sdesous/Infra_Ansible/tree/main/resources/pod_init"
    click WireguardPod "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/wireguard"
    click OmbiPod "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/ombi"
    click VaultwardenPod "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/vaultwarden"
    click NextcloudPod "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/nextcloud"
    click HAProxyPod "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/haproxy"
    click TransferPod "https://github.com/sdesous/Infra_Ansible/blob/main/roles/services/transfer.sh"
    click MealiePod "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/mealie"
    click Jellyfin "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/jellyfin"
    click Flaresolverr "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/flaresolverr"
    click Jackett "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/jackett"
    click Transmission "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/transmission"
    click Sonarr "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/sonarr"
    click Radarr "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/radarr"
    click Lidarr "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/lidarr"
    click Homarr "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/homarr"
    click PiHole "https://github.com/sdesous/Infra_Ansible/tree/main/roles/services/pihole"
    click Backup "https://github.com/sdesous/Infra_Ansible/blob/main/resources/backup.sh"
    click UserManagement "https://github.com/sdesous/Infra_Ansible/blob/main/library/subuid_or_subgid.py"
    click UpdateSystem "https://github.com/sdesous/Infra_Ansible/tree/main/roles/update"
```
