# hamedsafikhani/onprem-lab-ansible architecture

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

- Interactive diagram: https://gitdiagram.com/hamedsafikhani/onprem-lab-ansible
- Repository: https://github.com/hamedsafikhani/onprem-lab-ansible

## Overview

This repository is infrastructure configuration for deploying a Todo application. The likely operator workflow is to use the Ansible playbook and inventory to configure a host, install and configure the application and its supporting services, and expose it through Nginx. The tree identifies separate roles for common setup, the app, PostgreSQL, Redis, and Nginx. Source excerpts and a README were not available, so role-to-service links reflect directory names; detailed task ordering and runtime connections are not asserted.

Main entry points: [`ansible/site.yml`](https://github.com/hamedsafikhani/onprem-lab-ansible/blob/main/ansible/site.yml) (Ansible playbook), [`ansible/roles/common`](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/common) (Common setup), [`ansible/roles/app`](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/app) (App deployment), [`ansible/roles/postgresql`](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/postgresql) (PostgreSQL setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["Deployment control"]
  node_vagrant["Vagrant config"]
  node_playbook["Ansible playbook<br/>[site.yml]"]
  node_inventory["Host inventory"]
  node_common["Common setup"]
end

subgraph group_application["Application"]
  node_app_role["App deployment"]
  node_todo_app["Todo application"]
end

subgraph group_data["Data services"]
  node_postgres_role["PostgreSQL setup"]
  node_postgres[("PostgreSQL")]
  node_redis_role["Redis setup"]
  node_redis[("Redis")]
end

subgraph group_ingress["Ingress"]
  node_nginx_role["Nginx setup"]
  node_nginx["Nginx"]
end

node_operator(("Operator"))
node_clients(("Application clients"))

node_operator -->|"uses"| node_vagrant
node_operator -->|"runs"| node_playbook
node_playbook -->|"targets"| node_inventory
node_playbook -->|"applies"| node_common
node_playbook -->|"applies"| node_app_role
node_playbook -->|"applies"| node_postgres_role
node_playbook -->|"applies"| node_redis_role
node_playbook -->|"applies"| node_nginx_role
node_common -->|"prepares host"| node_todo_app
node_app_role -->|"deploys"| node_todo_app
node_postgres_role -->|"configures"| node_postgres
node_redis_role -->|"configures"| node_redis
node_nginx_role -->|"configures"| node_nginx
node_clients -->|"connects"| node_nginx

click node_vagrant "https://github.com/hamedsafikhani/onprem-lab-ansible/blob/main/Vagrantfile"
click node_playbook "https://github.com/hamedsafikhani/onprem-lab-ansible/blob/main/ansible/site.yml"
click node_inventory "https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/inventory"
click node_common "https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/common"
click node_app_role "https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/app"
click node_postgres_role "https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/postgresql"
click node_redis_role "https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/redis"
click node_nginx_role "https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/nginx"

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_vagrant,node_playbook,node_inventory,node_common,node_clients toneBlue
class node_app_role,node_todo_app toneAmber
class node_postgres_role,node_postgres,node_redis_role,node_redis toneMint
class node_nginx_role,node_nginx toneRose
class node_operator toneIndigo
```

## Components

### Deployment control

- [Vagrant config](https://github.com/hamedsafikhani/onprem-lab-ansible/blob/main/Vagrantfile): `Vagrantfile`
- [Ansible playbook](https://github.com/hamedsafikhani/onprem-lab-ansible/blob/main/ansible/site.yml): `ansible/site.yml`
- [Host inventory](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/inventory): `ansible/inventory`
- [Common setup](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/common): `ansible/roles/common`

### Application

- [App deployment](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/app): `ansible/roles/app`
- **Todo application**

### Data services

- [PostgreSQL setup](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/postgresql): `ansible/roles/postgresql`
- **PostgreSQL**
- [Redis setup](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/redis): `ansible/roles/redis`
- **Redis**

### Ingress

- [Nginx setup](https://github.com/hamedsafikhani/onprem-lab-ansible/tree/main/ansible/roles/nginx): `ansible/roles/nginx`
- **Nginx**

### Other components

- **Operator**
- **Application clients**

## Connections

- Operator → Vagrant config: uses
- Operator → Ansible playbook: runs
- Ansible playbook → Host inventory: targets
- Ansible playbook → Common setup: applies
- Ansible playbook → App deployment: applies
- Ansible playbook → PostgreSQL setup: applies
- Ansible playbook → Redis setup: applies
- Ansible playbook → Nginx setup: applies
- Common setup → Todo application: prepares host
- App deployment → Todo application: deploys
- PostgreSQL setup → PostgreSQL: configures
- Redis setup → Redis: configures
- Nginx setup → Nginx: configures
- Application clients → Nginx: connects
