Skip to content

devopsaitoolkit/ansible-playbooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🅰️ ansible-playbooks

One of the most comprehensive collections of production-ready Ansible on GitHub.

150+ idempotent playbooks · reusable roles · Molecule tests · inventories · docs — all linted to the ansible-lint production profile.

CI Molecule Link check License: Apache-2.0 ansible-lint: production PRs welcome


Most Ansible examples online are toy snippets that break on the second run or use deprecated modules. This repository is different: every playbook is idempotent, FQCN-based, production-safe, and CI-linted to the strictest profile — the automation you actually want to run against real fleets.

If this saves you time, star the repo — it helps other engineers find it.

Why this repository

  • Production, not toys. Idempotent, --check-friendly, explicit file modes, state: present over latest, documented rollback and validation steps.
  • Modern and safe. Targets ansible-core >= 2.15, Fully Qualified Collection Names, no deprecated modules. CI enforces ansible-lint production profile.
  • Tested. Reusable roles ship Molecule scenarios; custom plugins/modules have pytest unit tests.
  • Comprehensive. Linux, networking, storage, monitoring, logging, containers, Kubernetes, OpenStack, databases, security hardening, certificates, backups.

Quick start

git clone https://github.com/devopsaitoolkit/ansible-playbooks.git
cd ansible-playbooks

pip install -r requirements.txt
ansible-galaxy collection install -r requirements.yml -p collections

# Dry-run a playbook against your inventory
ansible-playbook playbooks/linux/baseline.yml -i inventories/dev/hosts.ini --check --diff

What's inside

Area Contents
📜 playbooks/ 150+ playbooks, grouped by domain
🧩 roles/ Reusable roles with Molecule scenarios
🗂️ inventories/ dev, staging, prod, multi-region, hybrid, OpenStack, VMware, AWS, Azure, GCP
🧠 filter_plugins/ · library/ Custom Jinja2 filters and a module (pytest-tested)
📚 docs/ Best practices, Vault, Molecule, Jinja2, idempotency, CI/CD + diagrams
🔧 scripts/ lint, syntax-check, molecule, inventory validate, vault, scaffolding

Playbook catalog

Domain Examples
Linux baseline, packages, users, SSH, sysctl, systemd, kernel, NTP/chrony
Storage LVM, filesystem growth, disk expansion, mounts
Networking interfaces, firewall (ufw/firewalld/nftables), DNS, bonding
Containers Docker, Compose, Podman, registry login, cleanup, image management
Kubernetes kubectl, Helm, node prep, kubeconfig distribution
OpenStack clouds.yaml, application credentials, Nova/Neutron/Cinder/Glance/Keystone, Kolla
Databases MySQL/MariaDB, PostgreSQL, Redis, RabbitMQ
Web NGINX, Apache, TLS, reverse proxy
Monitoring · Logging node_exporter, Grafana Agent, Telegraf, Prometheus, rsyslog, Loki
Security CIS baselines, SSH hardening, firewall, fail2ban, auditd
Certificates · Backup · Patching Let's Encrypt, internal CA, restic/borg, patch management
Storage systems · CI runners Ceph, LINSTOR, GitLab/GitHub runners

Browse the searchable index, the platform support matrix, and the decision tree for picking the right playbook.

Reusable roles

- name: Configure web servers
  hosts: web
  become: true
  roles:
    - role: common
    - role: security
    - role: docker

See roles/ — each role has a README, defaults, handlers, templates, and a Molecule scenario. The role compatibility matrix shows what runs where.

Target audience

DevOps & Platform Engineers · SREs · Linux & Cloud administrators · OpenStack operators · Kubernetes administrators · automation engineers.

Contributing

Operator experience is what makes this library great. Adding a playbook takes 20 minutes and helps the whole community.

By participating you agree to our Code of Conduct.

License

Apache-2.0. Use the playbooks and roles freely in your own infrastructure.

Further reading & free resources

This repository stands on its own. To go deeper on AI-assisted automation, these free resources from the maintainers help you keep learning:


Built by engineers who automate production fleets for a living. If it helps you, give it a ⭐.

About

One of the most comprehensive collections of production-ready Ansible playbooks, roles, and automation on GitHub — idempotent, FQCN, Molecule-tested.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages