This repository contains infrastructure configurations, playbooks, and automation scripts for managing local and remote servers using Ansible and Terraform, isolated within Docker containers.
.
├── docker-compose.yml # Containers for Ansible and Terraform
├── inventory/
│ ├── hosts.ini # Active inventory (ignored by Git)
│ └── hosts.ini.example # Example inventory template
├── LICENSE.md
├── Makefile # Shortcut commands for execution
├── playbooks/ # Ansible playbooks (e.g., node-exporter)
├── README.md # Project documentation
└── ssh/
├── README.md # Instructions for SSH keys
├── vagrant_db_id_rsa # Private key for DB VM (ignored)
└── vagrant_web_id_rsa # Private key for Web VM (ignored)To work with this project, you need:
-
Docker & Docker Compose
-
Make (optional, for convenience via Makefile)
-
Running Vagrant virtual machines (for local testing)
Copy the example inventory file and configure it according to your environment: cp inventory/hosts.ini.example inventory/hosts.ini
If you are testing with local Vagrant virtual machines, copy the respective private keys into the ssh/ folder and set strict permissions:
cp /path/to/vagrant/machine/.vagrant/machines/virtualbox/private_key ssh/vagrant__id_rsa
chmod 700 ssh
chmod 600 ssh/*For more info, please check ssh/README.md
The project includes a Makefile for fast task execution inside Docker containers:
- Check Ansible version:
make test-ansible- Check Terraform version:
make test-terraform- Deploy Prometheus Node Exporter (Telemetry):
make run-node-ex