# bertcenteno/ansible-lab architecture

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

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

## Overview

This repository is an Ansible infrastructure and application-deployment lab with a Jenkins-driven validation and promotion workflow. The principal path is change validation, development artifact creation, artifact verification and approval, then deployment to the selected environment. Ansible roles provide the configuration and service-management layer. Relationships are based on the README; source excerpts were unavailable, so links from the playbook to individual roles are left unverified.

Main entry points: [`site.yml`](https://github.com/bertcenteno/ansible-lab/blob/main/site.yml) (Ansible deployment), [`Jenkinsfile`](https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile) (Jenkins pipeline), [`scripts/build-artifact.sh`](https://github.com/bertcenteno/ansible-lab/blob/main/scripts/build-artifact.sh) (Deployment artifact), [`deployment-history/prod/deployment-23.json`](https://github.com/bertcenteno/ansible-lab/blob/main/deployment-history/prod/deployment-23.json) (Deployment history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["Pipeline and promotion"]
  node_jenkins["Jenkins pipeline"]
  node_quality["Quality gate"]
  node_artifact["Deployment artifact<br/>[build-artifact.sh]"]
  node_integrity["Artifact integrity"]
  node_approval["Production approval"]
  node_history[("Deployment history<br/>[deployment-23.json]")]
end

subgraph group_configuration["Ansible configuration"]
  node_deployment["Ansible deployment<br/>[site.yml]"]
  node_common["Common setup<br/>[main.yml]"]
  node_users["User management<br/>[main.yml]"]
  node_chrony["Time synchronization<br/>[main.yml]"]
  node_apache["Apache service<br/>[main.yml]"]
  node_mariadb["MariaDB service<br/>[main.yml]"]
  node_docker["Docker engine<br/>[main.yml]"]
  node_compose["Compose deployment<br/>[main.yml]"]
  node_monitoring["Monitoring setup<br/>[main.yml]"]
end

subgraph group_environments["Inventory and secrets"]
  node_dev_inventory["Development inventory"]
  node_prod_inventory["Production inventory"]
  node_vault["Environment secrets<br/>[vault.yml]"]
end

node_github(("GitHub changes"))

node_github -->|"triggers validation"| node_jenkins
node_jenkins -->|"checks results"| node_quality
node_quality -->|"permits build"| node_artifact
node_artifact -->|"verified before promotion"| node_integrity
node_integrity -->|"gates approval"| node_approval
node_approval -->|"authorizes production"| node_deployment
node_jenkins -->|"runs development deployment"| node_deployment
node_deployment -.->|"uses environment inventory"| node_dev_inventory
node_deployment -.->|"uses environment inventory"| node_prod_inventory
node_deployment -.->|"uses secrets"| node_vault
node_deployment -.->|"may apply role"| node_common
node_deployment -.->|"may apply role"| node_users
node_deployment -.->|"may apply role"| node_chrony
node_deployment -.->|"may apply role"| node_apache
node_deployment -.->|"may apply role"| node_mariadb
node_deployment -.->|"may apply role"| node_docker
node_deployment -.->|"may apply role"| node_compose
node_deployment -.->|"may apply role"| node_monitoring
node_deployment -.->|"records deployment"| node_history

click node_jenkins "https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile"
click node_quality "https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile"
click node_artifact "https://github.com/bertcenteno/ansible-lab/blob/main/scripts/build-artifact.sh"
click node_integrity "https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile"
click node_approval "https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile"
click node_deployment "https://github.com/bertcenteno/ansible-lab/blob/main/site.yml"
click node_dev_inventory "https://github.com/bertcenteno/ansible-lab/blob/main/inventories/dev/hosts"
click node_prod_inventory "https://github.com/bertcenteno/ansible-lab/blob/main/inventories/prod/hosts"
click node_vault "https://github.com/bertcenteno/ansible-lab/blob/main/inventories/prod/group_vars/all/vault.yml"
click node_common "https://github.com/bertcenteno/ansible-lab/blob/main/roles/common/tasks/main.yml"
click node_users "https://github.com/bertcenteno/ansible-lab/blob/main/roles/users/tasks/main.yml"
click node_chrony "https://github.com/bertcenteno/ansible-lab/blob/main/roles/chrony/tasks/main.yml"
click node_apache "https://github.com/bertcenteno/ansible-lab/blob/main/roles/apache/tasks/main.yml"
click node_mariadb "https://github.com/bertcenteno/ansible-lab/blob/main/roles/mariadb/tasks/main.yml"
click node_docker "https://github.com/bertcenteno/ansible-lab/blob/main/roles/docker/tasks/main.yml"
click node_compose "https://github.com/bertcenteno/ansible-lab/blob/main/roles/docker_compose/tasks/main.yml"
click node_monitoring "https://github.com/bertcenteno/ansible-lab/blob/main/roles/monitoring/tasks/main.yml"
click node_history "https://github.com/bertcenteno/ansible-lab/blob/main/deployment-history/prod/deployment-23.json"

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_jenkins,node_quality,node_artifact,node_integrity,node_approval,node_history toneBlue
class node_deployment,node_common,node_users,node_chrony,node_apache,node_mariadb,node_docker,node_compose,node_monitoring toneAmber
class node_dev_inventory,node_prod_inventory,node_vault toneMint
class node_github toneIndigo
```

## Components

### Pipeline and promotion

- [Jenkins pipeline](https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile): `Jenkinsfile`
- [Quality gate](https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile): `Jenkinsfile`
- [Deployment artifact](https://github.com/bertcenteno/ansible-lab/blob/main/scripts/build-artifact.sh): `scripts/build-artifact.sh`
- [Artifact integrity](https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile): `Jenkinsfile`
- [Production approval](https://github.com/bertcenteno/ansible-lab/blob/main/Jenkinsfile): `Jenkinsfile`
- [Deployment history](https://github.com/bertcenteno/ansible-lab/blob/main/deployment-history/prod/deployment-23.json): `deployment-history/prod/deployment-23.json`

### Ansible configuration

- [Ansible deployment](https://github.com/bertcenteno/ansible-lab/blob/main/site.yml): `site.yml`
- [Common setup](https://github.com/bertcenteno/ansible-lab/blob/main/roles/common/tasks/main.yml): `roles/common/tasks/main.yml`
- [User management](https://github.com/bertcenteno/ansible-lab/blob/main/roles/users/tasks/main.yml): `roles/users/tasks/main.yml`
- [Time synchronization](https://github.com/bertcenteno/ansible-lab/blob/main/roles/chrony/tasks/main.yml): `roles/chrony/tasks/main.yml`
- [Apache service](https://github.com/bertcenteno/ansible-lab/blob/main/roles/apache/tasks/main.yml): `roles/apache/tasks/main.yml`
- [MariaDB service](https://github.com/bertcenteno/ansible-lab/blob/main/roles/mariadb/tasks/main.yml): `roles/mariadb/tasks/main.yml`
- [Docker engine](https://github.com/bertcenteno/ansible-lab/blob/main/roles/docker/tasks/main.yml): `roles/docker/tasks/main.yml`
- [Compose deployment](https://github.com/bertcenteno/ansible-lab/blob/main/roles/docker_compose/tasks/main.yml): `roles/docker_compose/tasks/main.yml`
- [Monitoring setup](https://github.com/bertcenteno/ansible-lab/blob/main/roles/monitoring/tasks/main.yml): `roles/monitoring/tasks/main.yml`

### Inventory and secrets

- [Development inventory](https://github.com/bertcenteno/ansible-lab/blob/main/inventories/dev/hosts): `inventories/dev/hosts`
- [Production inventory](https://github.com/bertcenteno/ansible-lab/blob/main/inventories/prod/hosts): `inventories/prod/hosts`
- [Environment secrets](https://github.com/bertcenteno/ansible-lab/blob/main/inventories/prod/group_vars/all/vault.yml): `inventories/prod/group_vars/all/vault.yml`

### Other components

- **GitHub changes**

## Connections

- GitHub changes → Jenkins pipeline: triggers validation (evidence: `README.md`)
- Jenkins pipeline → Quality gate: checks results (evidence: `README.md`)
- Quality gate → Deployment artifact: permits build (evidence: `README.md`)
- Deployment artifact → Artifact integrity: verified before promotion (evidence: `README.md`)
- Artifact integrity → Production approval: gates approval (evidence: `README.md`)
- Production approval → Ansible deployment: authorizes production (evidence: `README.md`)
- Jenkins pipeline → Ansible deployment: runs development deployment (evidence: `README.md`)
- Ansible deployment → Development inventory: uses environment inventory
- Ansible deployment → Production inventory: uses environment inventory
- Ansible deployment → Environment secrets: uses secrets
- Ansible deployment → Common setup: may apply role
- Ansible deployment → User management: may apply role
- Ansible deployment → Time synchronization: may apply role
- Ansible deployment → Apache service: may apply role
- Ansible deployment → MariaDB service: may apply role
- Ansible deployment → Docker engine: may apply role
- Ansible deployment → Compose deployment: may apply role
- Ansible deployment → Monitoring setup: may apply role
- Ansible deployment → Deployment history: records deployment
