This repository provides a hands-on learning environment for Event-Driven Ansible (EDA), including rulebooks, Ansible Automation Platform workflows, event sources, and practical examples that connect theory to real automation scenarios.
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>This repository guides you through:
- ✔ Fundamentals of Event-Driven Automation
- ✔ Difference between EDA & traditional Ansible automation
- ✔ How event sources, rules, and actions work
- ✔ How to write and run Ansible rulebooks
- ✔ How to trigger automation from:
- file changes
- webhooks
- service alerts
- Git updates
You will build real workflows that react to live events.
docs/ → Theory & explanations
setup/ → Installation guides
rulebooks/ → EDA rulebook examples
playbooks/ → Classic Ansible playbooks called by rulebooks
labs/ → Hands-on exercises
utils/ → Helper scripts & event generators
pip install ansible
pip install ansible-rulebook
ansible-galaxy collection install ansible.eda
ansible-rulebook -r rulebooks/filewatch.yml
rulebooks/filewatch.yml:
sources:
- ansible.eda.filewatch:
path: /tmp/messages
rules:
- name: Restart service when file changes
condition: event.change == "modified"
action:
run_playbook:
name: ../playbooks/restart_service.yml| Lab | Topic |
|---|---|
| Lab 1 | Run your first rulebook |
| Lab 2 | Build your own rulebook |
| Lab 3 | Integrate rulebooks with playbooks |
| Lab 4 | File-based event monitoring |
| Lab 5 | Webhook-triggered automation |
Each lab is 15–30 minutes.
- Beginners in Ansible
- DevOps engineers exploring automation
- SREs wanting event-triggered workflows
- Students learning IaC / DevOps fundamentals
This repo is suitable for self-study, classroom, or workshop preparation.
Potential modules to add later:
- Kafka event source examples
- GitHub Actions → EDA integration
- Monitor GPU jobs (NVIDIA context)
- Slack / Teams notification pipelines
- Kubernetes event triggers