# rezapy216/my-vagrant architecture

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

- Interactive diagram: https://gitdiagram.com/rezapy216/my-vagrant
- Repository: https://github.com/rezapy216/my-vagrant

## Overview

This repository appears to define a local multi-machine environment and Ansible configuration for setting up a Docker Swarm cluster. The likely operator workflow is to start the Vagrant machines and apply the Ansible playbooks to configure them. The tree identifies environment, inventory, shared variables, and Docker/Swarm playbooks, but no README or source excerpts were provided; workflow links below are therefore dashed and unverified, not confirmed call relationships.

Main entry points: [`playbooks/site.yaml`](https://github.com/rezapy216/my-vagrant/blob/master/playbooks/site.yaml) (Site playbook), [`inventory/hosts.ini`](https://github.com/rezapy216/my-vagrant/blob/master/inventory/hosts.ini) (Manager and workers), [`playbooks/docker.yaml`](https://github.com/rezapy216/my-vagrant/blob/master/playbooks/docker.yaml) (Docker setup), [`playbooks/swarm.yaml`](https://github.com/rezapy216/my-vagrant/blob/master/playbooks/swarm.yaml) (Swarm setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_environment["Local environment"]
  node_vagrant["Vagrant machines"]
end

subgraph group_ansible["Ansible orchestration"]
  node_inventory["Host inventory<br/>[hosts.ini]"]
  node_ansible_config["Ansible settings<br/>[ansible.cfg]"]
  node_shared_vars["Shared variables<br/>[all.yaml]"]
  node_site_playbook["Site playbook<br/>[site.yaml]"]
end

subgraph group_cluster["Swarm cluster"]
  node_docker_playbook["Docker setup<br/>[docker.yaml]"]
  node_swarm_playbook["Swarm setup<br/>[swarm.yaml]"]
  node_cluster_hosts["Manager and workers<br/>[hosts.ini]"]
end

node_operator(("Operator"))

node_operator -.->|"starts machines"| node_vagrant
node_operator -.->|"applies playbook"| node_site_playbook
node_site_playbook -.->|"targets hosts"| node_inventory
node_site_playbook -.->|"uses settings"| node_ansible_config
node_site_playbook -.->|"uses variables"| node_shared_vars
node_site_playbook -.->|"includes setup"| node_docker_playbook
node_site_playbook -.->|"includes setup"| node_swarm_playbook
node_inventory -.->|"defines hosts"| node_cluster_hosts
node_docker_playbook -.->|"configures Docker"| node_cluster_hosts
node_swarm_playbook -.->|"configures Swarm"| node_cluster_hosts

click node_vagrant "https://github.com/rezapy216/my-vagrant/blob/master/Vagrantfile"
click node_inventory "https://github.com/rezapy216/my-vagrant/blob/master/inventory/hosts.ini"
click node_ansible_config "https://github.com/rezapy216/my-vagrant/blob/master/ansible.cfg"
click node_shared_vars "https://github.com/rezapy216/my-vagrant/blob/master/group_vars/all.yaml"
click node_site_playbook "https://github.com/rezapy216/my-vagrant/blob/master/playbooks/site.yaml"
click node_docker_playbook "https://github.com/rezapy216/my-vagrant/blob/master/playbooks/docker.yaml"
click node_swarm_playbook "https://github.com/rezapy216/my-vagrant/blob/master/playbooks/swarm.yaml"
click node_cluster_hosts "https://github.com/rezapy216/my-vagrant/blob/master/inventory/hosts.ini"

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 toneBlue
class node_inventory,node_ansible_config,node_shared_vars,node_site_playbook toneAmber
class node_docker_playbook,node_swarm_playbook,node_cluster_hosts toneMint
class node_operator toneIndigo
```

## Components

### Local environment

- [Vagrant machines](https://github.com/rezapy216/my-vagrant/blob/master/Vagrantfile): `Vagrantfile`

### Ansible orchestration

- [Host inventory](https://github.com/rezapy216/my-vagrant/blob/master/inventory/hosts.ini): `inventory/hosts.ini`
- [Ansible settings](https://github.com/rezapy216/my-vagrant/blob/master/ansible.cfg): `ansible.cfg`
- [Shared variables](https://github.com/rezapy216/my-vagrant/blob/master/group_vars/all.yaml): `group_vars/all.yaml`
- [Site playbook](https://github.com/rezapy216/my-vagrant/blob/master/playbooks/site.yaml): `playbooks/site.yaml`

### Swarm cluster

- [Docker setup](https://github.com/rezapy216/my-vagrant/blob/master/playbooks/docker.yaml): `playbooks/docker.yaml`
- [Swarm setup](https://github.com/rezapy216/my-vagrant/blob/master/playbooks/swarm.yaml): `playbooks/swarm.yaml`
- [Manager and workers](https://github.com/rezapy216/my-vagrant/blob/master/inventory/hosts.ini): `inventory/hosts.ini`

### Other components

- **Operator**

## Connections

- Operator → Vagrant machines: starts machines
- Operator → Site playbook: applies playbook
- Site playbook → Host inventory: targets hosts
- Site playbook → Ansible settings: uses settings
- Site playbook → Shared variables: uses variables
- Site playbook → Docker setup: includes setup
- Site playbook → Swarm setup: includes setup
- Host inventory → Manager and workers: defines hosts
- Docker setup → Manager and workers: configures Docker
- Swarm setup → Manager and workers: configures Swarm
