AI Stack Ansible Playbook Bundle: Deploy Ollama, Open WebUI, and GPU Monitoring on Rocky Linux in 15 Minutes
You followed the guide. Now automate the whole thing.
This Ansible playbook bundle deploys a complete self-hosted AI stack on Rocky Linux 9 in a single ansible-playbook run — idempotent, repeatable, and ready to tear down and rebuild when you inevitably decide to tweak everything.
What it deploys:
- NVIDIA GPU drivers with container toolkit configuration
- Ollama with GPU acceleration and model pre-pulling
- Open WebUI behind NGINX with TLS termination
- Prometheus + Grafana + NVIDIA GPU exporter with a pre-built dashboard
- fail2ban, automated backups, and log rotation
What's in the bundle:
- site.yml — single entry point, runs everything in the right order
- verify.yml — post-deploy validation that confirms every service is actually running and responding
- 7 roles: nvidia-gpu, ollama, open-webui, nginx-ai-proxy, ai-monitoring, ai-hardening, firewall
- vault.yml.example — every variable documented with what it does and where it's used
- hosts.yml.example — inventory template, fill in your IPs and go
- requirements.yml — Ansible Galaxy dependencies
What makes this different from a random GitHub repo:
- Every task has a descriptive name — you can read the output and know exactly what happened
- Every role uses fully qualified collection names — no ambiguity, no deprecation warnings
- Idempotent from day one — run it once to deploy, run it again to fix drift, run it after an update to converge back
- Tested with a 4-phase pipeline: deploy, verify, idempotency check, re-verify
Who this is for: Anyone who read the guide (or already knows what they're doing) and wants to skip the manual work. Point it at a fresh Rocky Linux 9 box with an NVIDIA GPU and let it rip.