This repository contains ready-to-use Ansible collections for configuring a server with a specific runtime stack. Each collection installs and configures everything needed behind an Nginx reverse proxy — so you can set up a fully functioning server with a single command.
Ansible is an open-source automation tool that lets you configure servers, run applications, and manage infrastructure — all without installing any agent on the target machine. You write tasks in simple YAML files called playbooks, and Ansible connects via SSH to execute them.
Instead of manually running commands on each server, you define once what your server should look like and let Ansible do the rest.
Ansible Galaxy is the official hub for sharing Ansible collections and roles. It works like a package manager — you can download pre-built automation content published by the community or by vendors. This repo's collections are published on Galaxy, so you can install them directly with ansible-galaxy collection install.
These collections let you turn a blank VM or VPS into a fully configured server for your preferred runtime — whether that's for a web app, API, or backend service. Just pick the stack you need, run the playbook, and your server is ready to go. They're also great for learning how Ansible automates real-world server setup.
graph LR
A[Your Machine] -->|SSH| B[Target Server]
A --> C[Ansible Playbook]
C --> D[Collection Roles]
D --> E[Install & Configure]
E --> F[Nginx + App Stack Ready]
Each collection contains a playbook that calls multiple roles to install and configure everything needed for a specific tech stack.
| Collection | Stack | Link |
|---|---|---|
node_app_server_bootstrap | Node.js + Nginx + PM2 | galaxy |
dotnet_app_server_bootstrap | .NET/C# + Nginx | galaxy |
php_app_server_bootstrap | PHP + PHP-FPM + Nginx | galaxy |
python_app_server_bootstrap | Python + Gunicorn + Nginx | galaxy |
golang_app_server_bootstrap | Go + Nginx | galaxy |
docker_bootstrap | Docker Engine + Docker Compose | galaxy |
podman_bootstrap | Podman + Podman Compose | galaxy |
kubernetes_helm_bootstrap | kubectl + Helm | galaxy |
observability_bootstrap | Prometheus + Grafana + Loki + Promtail + Tempo + OpenTelemetry + Nginx | galaxy |
Each collection has its own GitHub Actions workflow that runs on pushes and pull requests to main:
Each workflow runs two jobs:
- syntax-check — Installs Ansible, builds the collection, and validates both
install.ymlanduninstall.ymlwith--syntax-check(runs on every push/PR). - deploy — Triggered manually via
workflow_dispatch. Takeshostandansible_useras inputs; the SSH private key is read from theSSH_PRIVATE_KEYrepository secret for security.
- Create an inventory file (
inventory.ini) with your server IP:[webserver] 192.168.1.10 ansible_user=root
- Navigate to a collection folder, e.g.
cd node_app_server_bootstrap - Run a playbook:
ansible-playbook playbooks/<playbook>.yml -i inventory.ini
See CONTRIBUTING.md for detailed setup and publishing instructions.
You don't need a Linux machine to run these playbooks — any environment with Ansible installed can SSH into a remote server.
# Install Ansible inside your WSL distro (Ubuntu/Debian)
sudo apt update && sudo apt install -y ansible
# Clone the repo
git clone https://github.com/marcuwynu23/ansible-collections.git
cd ansible-collections
# Run a playbook
ansible-playbook node_app_server_bootstrap/playbooks/<playbook>.yml -i inventory.ini# Run Ansible from an Alpine container with SSH access
docker run --rm -it -v ${PWD}:/workspace -w /workspace alpine:latest sh -c \
"apk add --no-cache ansible openssh-client && sh"
# Inside the container, run:
# ansible-playbook node_app_server_bootstrap/playbooks/<playbook>.yml -i inventory.ini# Same as Docker, but with Podman
podman run --rm -it -v ${PWD}:/workspace:Z -w /workspace alpine:latest sh -c \
"apk add --no-cache ansible openssh-client && sh"