# devnotops/ansible architecture

> Architecture diagram of the GitHub repository devnotops/ansible, 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/devnotops/ansible
- Repository: https://github.com/devnotops/ansible

## Overview

This repository is a collection of Ansible administration and web-server examples, plus a small PHP login/profile demo. The README’s documented workflow is an operator invoking Ansible against an inventory to run a module on managed hosts. The sampled PHP app separately authenticates users against MySQL, then serves a session-protected profile and logout flow. Other playbooks and deployment configurations are visible in the tree, but their internals were not sampled, so their relationships are left unasserted.

Main entry points: [`full_docker_websrever/website/index.php`](https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/index.php) (Login and auth), [`full_docker_websrever/website/profile.php`](https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/profile.php) (Protected profile), [`full_docker_websrever/website/logout.php`](https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/logout.php) (Session logout), [`hosts.ini`](https://github.com/devnotops/ansible/blob/main/hosts.ini) (Host inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_automation["Ansible examples"]
  node_inventory["Host inventory<br/>[hosts.ini]"]
  node_playbook["General playbook<br/>[main.php]"]
  node_conditional["Conditional tasks"]
  node_filemodule["File module<br/>[file_module.yml]"]
  node_mysqlsetup["MySQL setup<br/>[mysql.yml]"]
  node_postgressetup["PostgreSQL setup<br/>[create_db_user.yml]"]
  node_apache_role["Apache role<br/>[main.yml]"]
  node_webdeploy["Alpine webserver"]
end

subgraph group_web["Web examples"]
  node_containerdeploy["Container deployment<br/>[main.yml]"]
  node_container_image["Container image"]
  node_static_site["Static website<br/>[index.html]"]
  node_fancy_page["Fancy PHP page<br/>[main.php]"]
end

subgraph group_auth["Login demo"]
  node_login["Login and auth<br/>[index.php]"]
  node_mysql[("Login database")]
  node_profile["Protected profile<br/>[profile.php]"]
  node_logout["Session logout<br/>[logout.php]"]
end

node_operator(("Operator"))
node_ansible["Ansible CLI"]
node_browser(("Web user"))

node_operator -->|"runs commands"| node_ansible
node_ansible -->|"targets hosts"| node_inventory
node_browser -->|"submits credentials"| node_login
node_login -->|"queries users"| node_mysql
node_login -->|"redirects on success"| node_profile
node_profile -->|"links to"| node_logout
node_logout -->|"redirects to"| node_login

click node_inventory "https://github.com/devnotops/ansible/blob/main/hosts.ini"
click node_playbook "https://github.com/devnotops/ansible/blob/main/main.php"
click node_conditional "https://github.com/devnotops/ansible/blob/main/playbook_with_when.yml"
click node_filemodule "https://github.com/devnotops/ansible/blob/main/file_module.yml"
click node_mysqlsetup "https://github.com/devnotops/ansible/blob/main/mysql/mysql.yml"
click node_postgressetup "https://github.com/devnotops/ansible/blob/main/postgresql/create_db_user.yml"
click node_apache_role "https://github.com/devnotops/ansible/blob/main/roles/apache2/tasks/main.yml"
click node_webdeploy "https://github.com/devnotops/ansible/blob/main/start_wepserver_alpine.yml"
click node_containerdeploy "https://github.com/devnotops/ansible/blob/main/container/main.yml"
click node_container_image "https://github.com/devnotops/ansible/blob/main/container/Dockerfile"
click node_static_site "https://github.com/devnotops/ansible/blob/main/container/website/index.html"
click node_fancy_page "https://github.com/devnotops/ansible/blob/main/main.php"
click node_login "https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/index.php"
click node_profile "https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/profile.php"
click node_logout "https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/logout.php"

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_playbook,node_conditional,node_filemodule,node_mysqlsetup,node_postgressetup,node_apache_role,node_webdeploy,node_browser toneBlue
class node_containerdeploy,node_container_image,node_static_site,node_fancy_page toneAmber
class node_login,node_mysql,node_profile,node_logout toneMint
class node_operator,node_ansible toneIndigo
```

## Components

### Ansible examples

- [Host inventory](https://github.com/devnotops/ansible/blob/main/hosts.ini): `hosts.ini`
- [General playbook](https://github.com/devnotops/ansible/blob/main/main.php): `main.php`
- [Conditional tasks](https://github.com/devnotops/ansible/blob/main/playbook_with_when.yml): `playbook_with_when.yml`
- [File module](https://github.com/devnotops/ansible/blob/main/file_module.yml): `file_module.yml`
- [MySQL setup](https://github.com/devnotops/ansible/blob/main/mysql/mysql.yml): `mysql/mysql.yml`
- [PostgreSQL setup](https://github.com/devnotops/ansible/blob/main/postgresql/create_db_user.yml): `postgresql/create_db_user.yml`
- [Apache role](https://github.com/devnotops/ansible/blob/main/roles/apache2/tasks/main.yml): `roles/apache2/tasks/main.yml`
- [Alpine webserver](https://github.com/devnotops/ansible/blob/main/start_wepserver_alpine.yml): `start_wepserver_alpine.yml`

### Web examples

- [Container deployment](https://github.com/devnotops/ansible/blob/main/container/main.yml): `container/main.yml`
- [Container image](https://github.com/devnotops/ansible/blob/main/container/Dockerfile): `container/Dockerfile`
- [Static website](https://github.com/devnotops/ansible/blob/main/container/website/index.html): `container/website/index.html`
- [Fancy PHP page](https://github.com/devnotops/ansible/blob/main/main.php): `main.php`

### Login demo

- [Login and auth](https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/index.php): `full_docker_websrever/website/index.php`
- **Login database**
- [Protected profile](https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/profile.php): `full_docker_websrever/website/profile.php`
- [Session logout](https://github.com/devnotops/ansible/blob/main/full_docker_websrever/website/logout.php): `full_docker_websrever/website/logout.php`

### Other components

- **Operator**
- **Ansible CLI**
- **Web user**

## Connections

- Operator → Ansible CLI: runs commands (evidence: `README.md`)
- Ansible CLI → Host inventory: targets hosts (evidence: `README.md`)
- Web user → Login and auth: submits credentials (evidence: `full_docker_websrever/website/index.php`)
- Login and auth → Login database: queries users (evidence: `full_docker_websrever/website/index.php`)
- Login and auth → Protected profile: redirects on success (evidence: `full_docker_websrever/website/index.php`)
- Protected profile → Session logout: links to (evidence: `full_docker_websrever/website/profile.php`)
- Session logout → Login and auth: redirects to (evidence: `full_docker_websrever/website/logout.php`)
