Companion playbooks, roles, and inventory examples for the ComputingForGeeks Ansible series.
Every folder in this repo maps to a published article at computingforgeeks.com. Clone it, open the subdirectory that matches the article you're reading, and run the example.
git clone https://github.com/c4geeks/ansible.git c4geeks-ansible
cd c4geeks-ansible| Article | Folder |
|---|---|
| Install Ansible on Rocky Linux 10 & Ubuntu 24.04 | beginner/install-ansible-rocky-linux-ubuntu/ |
| Ansible Ad-Hoc Commands | beginner/ansible-ad-hoc-commands/ |
| Ansible Inventory Management | beginner/ansible-inventory-management/ |
| Your First Ansible Playbook | beginner/ansible-playbook-tutorial/ |
| Ansible Variables | beginner/ansible-variables-tutorial/ |
| Ansible Conditionals and Loops | beginner/ansible-conditionals-loops-tutorial/ |
| Ansible Jinja2 Templates | beginner/ansible-jinja2-templates-tutorial/ |
| Ansible Roles Tutorial | beginner/ansible-roles-tutorial/ |
| Debug Ansible Playbooks: 10 Tools and Patterns | beginner/ansible-debugging/ |
| Use Ansible Handlers: notify, listen, force_handlers | beginner/ansible-handlers-tutorial/ |
| Article | Folder |
|---|---|
| Ansible Vault | intermediate/ansible-vault-tutorial/ |
| Ansible Dynamic Inventory | intermediate/ansible-dynamic-inventory-tutorial/ |
| Test Ansible Roles with Molecule | intermediate/ansible-molecule-testing/ |
| Article | Folder |
|---|---|
| Event-Driven Ansible (EDA) | advanced/event-driven-ansible-eda-tutorial/ |
| Article | Folder |
|---|---|
| Terraform + Ansible | integrations/terraform-ansible-tutorial/ |
| Ansible + Proxmox | integrations/ansible-proxmox-tutorial/ |
| Ansible for Windows Server | integrations/ansible-windows-server-tutorial/ |
| Article | Folder |
|---|---|
| Harden Rocky Linux 10 with Ansible (CIS L1) | projects/ansible-server-hardening/ |
| Deploy WordPress on Rocky 10 with Ansible (LAMP/LEMP) | projects/ansible-lamp-lemp-stack/ |
| Ansible vs Chef vs Puppet vs Salt | projects/ansible-vs-chef-puppet-salt/ |
See the full 45-article plan at computingforgeeks.com/ansible-automation-guide/. Folders appear here as each article ships.
pillar/ Code referenced by the pillar article
cheatsheet/ Snippets from the cheat sheet
beginner/ Playbooks for articles 1-10
intermediate/ Playbooks for articles 11-20
advanced/ Playbooks for articles 21-30
integrations/ Terraform, Proxmox, Cloudflare, Vault, GitLab CI, K8s, etc.
projects/ LAMP, hardening, user mgmt, backup, comparisons
ansible.cfg Shared config used across examples
Per-article folders are named by the article's URL slug so you can jump from article to folder in one hop.
cd beginner/ansible-playbook-tutorial/
# Read the folder's README for what's inside and how to run it
ansible-playbook -i inventory site.ymlEvery folder with code has its own README explaining inventory expectations, required collections, and run commands.
- Ansible 2.16+ (
ansible-core2.16+) - Python 3.10+
ansible-galaxy collection install -r requirements.ymlin folders that declare one
Issues and PRs welcome. If you spot a bug in an example referenced by a published article, open an issue linking the article URL and the folder. Fixes land in the repo first, then in the article.
MIT — see LICENSE.
- k3s-ansible — K3s cluster deploy role (pending absorption into
integrations/) - ocp4_ansible — OpenShift 4 automation (pending absorption into
integrations/) - tomcat-ansible — Tomcat role (pending absorption into
projects/)