What is Event-Driven Ansible and where does it make sense?
AdvancedProductionAWX, AAP and Cloud Integration
Answer
EDA listens to event sources (Alertmanager, Kafka, webhooks, cloud events) and, when a rule matches, runs a playbook or an AWX job template. Rules live in rulebooks.
- name: Auto-remediate nginx
hosts: all
sources:
- ansible.eda.alertmanager:
host: 0.0.0.0
port: 5000
rules:
- name: Restart nginx when down
condition: event.alert.labels.alertname == "NginxDown" and event.alert.status == "firing"
action:
run_job_template:
name: "Restart nginx"
organization: Platform
Good uses: well-understood fixes (restart a stuck service, clear a full disk, enrich a ticket with diagnostics). Bad uses: anything where the fix is risky or the cause is unclear. Add throttling, keep humans in the loop for prod-impacting actions, and log every automated action to the incident channel.
More on AWX, AAP and Cloud Integration
AWX or Red Hat Ansible Automation Platform: what is the difference and what do you pay for?BeginnerWhat are the core objects in AWX and how do they fit together?BeginnerHow do you manage AWX configuration as code?IntermediateHow do custom credential types work in AWX?AdvancedHow do you connect AWX to an external secrets manager?IntermediateHow do you trigger AWX jobs from CI or other systems?Intermediate