# kenya-west/ansible-my architecture

> Architecture diagram of the GitHub repository kenya-west/ansible-my, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kenya-west/ansible-my
- Repository: https://github.com/kenya-west/ansible-my

## Overview

This is an Ansible infrastructure-as-code suite for preparing and operating VPSs. The principal workflow is an operator selecting hosts and capabilities in inventory, then running playbooks that apply modular roles to configure those hosts. The resulting infrastructure spans VPN/proxy services, web proxying, backups, security hardening, and observability; analytics is intentionally deployed centrally before node agents. The README documents these capabilities, but most role and playbook source was not sampled, so edges reflect documented relationships rather than inferred task-level calls.

Main entry points: [`playbooks`](https://github.com/kenya-west/ansible-my/tree/master/playbooks) (Deployment playbooks), [`playbooks/observability/server`](https://github.com/kenya-west/ansible-my/tree/master/playbooks/observability/server) (Central analytics), [`inventory`](https://github.com/kenya-west/ansible-my/tree/master/inventory) (Host inventory), [`playbooks/observability/node`](https://github.com/kenya-west/ansible-my/tree/master/playbooks/observability/node) (Node telemetry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Deployment inputs"]
  node_inventory["Host inventory"]
  node_playbooks["Deployment playbooks"]
  node_roles["Reusable Ansible roles"]
end

subgraph group_base["Host foundation"]
  node_preparation["VPS preparation"]
  node_security["Security hardening"]
end

subgraph group_services["Network services"]
  node_web["Caddy web server"]
  node_wireguard["WireGuard VPN"]
  node_frp["FRP proxy"]
  node_remnawave["Remnawave VPN"]
end

subgraph group_operations["Operations and telemetry"]
  node_backup["Automated backups"]
  node_analytics_server["Central analytics"]
  node_analytics_node["Node telemetry"]
  node_monitoring["Metrics and dashboards"]
  node_logging["Log aggregation"]
  node_billing["Infrastructure billing sync<br/>[infra_billing.py]"]
  node_billing_pull["Billing pull to hosts"]
end

node_operator(("Infrastructure operator"))

node_operator -->|"edits"| node_inventory
node_operator -->|"runs"| node_playbooks
node_inventory -->|"selects hosts"| node_playbooks
node_playbooks -->|"applies capabilities"| node_roles
node_playbooks -.->|"prepares hosts"| node_preparation
node_playbooks -->|"hardens hosts"| node_security
node_playbooks -->|"deploys"| node_web
node_playbooks -->|"deploys"| node_wireguard
node_playbooks -->|"deploys"| node_frp
node_playbooks -->|"deploys"| node_remnawave
node_playbooks -->|"configures backups"| node_backup
node_playbooks -->|"deploys first"| node_analytics_server
node_playbooks -->|"deploys agents"| node_analytics_node
node_analytics_server -->|"gathers telemetry"| node_analytics_node
node_analytics_server -->|"includes stack"| node_monitoring
node_analytics_server -->|"includes stack"| node_logging
node_operator -->|"runs sync"| node_billing
node_operator -->|"runs pull"| node_billing_pull

click node_inventory "https://github.com/kenya-west/ansible-my/tree/master/inventory"
click node_playbooks "https://github.com/kenya-west/ansible-my/tree/master/playbooks"
click node_roles "https://github.com/kenya-west/ansible-my/tree/master/roles"
click node_preparation "https://github.com/kenya-west/ansible-my/tree/master/playbooks/base"
click node_security "https://github.com/kenya-west/ansible-my/tree/master/roles/install_ufw"
click node_web "https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_caddy_caddy"
click node_wireguard "https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_caddy_wg"
click node_frp "https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_caddy_frp"
click node_remnawave "https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_server_remnawave"
click node_backup "https://github.com/kenya-west/ansible-my/tree/master/roles/install_backup_node_restic"
click node_analytics_server "https://github.com/kenya-west/ansible-my/tree/master/playbooks/observability/server"
click node_analytics_node "https://github.com/kenya-west/ansible-my/tree/master/playbooks/observability/node"
click node_monitoring "https://github.com/kenya-west/ansible-my/tree/master/roles/install_analytics_server_prometheus"
click node_logging "https://github.com/kenya-west/ansible-my/tree/master/roles/install_analytics_server_victorialogs"
click node_billing "https://github.com/kenya-west/ansible-my/blob/master/action_plugins/infra_billing.py"
click node_billing_pull "https://github.com/kenya-west/ansible-my/blob/master/action_plugins/infra_billing_pull.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_inventory,node_playbooks,node_roles toneBlue
class node_preparation,node_security toneAmber
class node_web,node_wireguard,node_frp,node_remnawave toneMint
class node_backup,node_analytics_server,node_analytics_node,node_monitoring,node_logging,node_billing,node_billing_pull toneRose
class node_operator toneIndigo
```

## Components

### Deployment inputs

- [Host inventory](https://github.com/kenya-west/ansible-my/tree/master/inventory): `inventory`
- [Deployment playbooks](https://github.com/kenya-west/ansible-my/tree/master/playbooks): `playbooks`
- [Reusable Ansible roles](https://github.com/kenya-west/ansible-my/tree/master/roles): `roles`

### Host foundation

- [VPS preparation](https://github.com/kenya-west/ansible-my/tree/master/playbooks/base): `playbooks/base`
- [Security hardening](https://github.com/kenya-west/ansible-my/tree/master/roles/install_ufw): `roles/install_ufw`

### Network services

- [Caddy web server](https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_caddy_caddy): `roles/install_vpn_caddy_caddy`
- [WireGuard VPN](https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_caddy_wg): `roles/install_vpn_caddy_wg`
- [FRP proxy](https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_caddy_frp): `roles/install_vpn_caddy_frp`
- [Remnawave VPN](https://github.com/kenya-west/ansible-my/tree/master/roles/install_vpn_server_remnawave): `roles/install_vpn_server_remnawave`

### Operations and telemetry

- [Automated backups](https://github.com/kenya-west/ansible-my/tree/master/roles/install_backup_node_restic): `roles/install_backup_node_restic`
- [Central analytics](https://github.com/kenya-west/ansible-my/tree/master/playbooks/observability/server): `playbooks/observability/server`
- [Node telemetry](https://github.com/kenya-west/ansible-my/tree/master/playbooks/observability/node): `playbooks/observability/node`
- [Metrics and dashboards](https://github.com/kenya-west/ansible-my/tree/master/roles/install_analytics_server_prometheus): `roles/install_analytics_server_prometheus`
- [Log aggregation](https://github.com/kenya-west/ansible-my/tree/master/roles/install_analytics_server_victorialogs): `roles/install_analytics_server_victorialogs`
- [Infrastructure billing sync](https://github.com/kenya-west/ansible-my/blob/master/action_plugins/infra_billing.py): `action_plugins/infra_billing.py`
- [Billing pull to hosts](https://github.com/kenya-west/ansible-my/blob/master/action_plugins/infra_billing_pull.py): `action_plugins/infra_billing_pull.py`

### Other components

- **Infrastructure operator**

## Connections

- Infrastructure operator → Host inventory: edits
- Infrastructure operator → Deployment playbooks: runs
- Host inventory → Deployment playbooks: selects hosts
- Deployment playbooks → Reusable Ansible roles: applies capabilities
- Deployment playbooks → VPS preparation: prepares hosts
- Deployment playbooks → Security hardening: hardens hosts
- Deployment playbooks → Caddy web server: deploys
- Deployment playbooks → WireGuard VPN: deploys
- Deployment playbooks → FRP proxy: deploys
- Deployment playbooks → Remnawave VPN: deploys
- Deployment playbooks → Automated backups: configures backups
- Deployment playbooks → Central analytics: deploys first
- Deployment playbooks → Node telemetry: deploys agents
- Central analytics → Node telemetry: gathers telemetry
- Central analytics → Metrics and dashboards: includes stack
- Central analytics → Log aggregation: includes stack
- Infrastructure operator → Infrastructure billing sync: runs sync
- Infrastructure operator → Billing pull to hosts: runs pull
