AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

What's New in Event-Driven Ansible: AAP 2.6 and 2.7 Features

By Luca Berton · Published 2024-01-01 · Category: events

Complete guide to Event-Driven Ansible updates in AAP 2.6 and 2.7: event bus, Kafka, mTLS, secrets, and new partner collections.

Event-Driven Ansible (EDA) in AAP 2.6 and 2.7 brings major improvements to event processing, security, and partner integrations. Here's the complete breakdown.

Event Bus Support Improvements

  • New Azure event bus — just released for Azure Event Grid/Service Bus integration
  • New AWS event bus — available for Amazon EventBridge
  • In-flight rulebook event persistence — provides increased rulebook resiliency; events survive controller restarts

EDA Automation Creation

Project Synchronization

  • Allow resync option on restarts — projects can re-sync from source control automatically

Rulebook Enhancements

  • Additional Jinja filters to replace regular expressions, offering more flexibility in event matching
  • Better condition matching without complex regex patterns

Operational Updates

  • Streamlined ansible.eda content collection
  • Updated decision environments with latest dependencies

Secrets Management Support

EDA now integrates with external secrets managers:

  • HashiCorp Vault
  • CyberArk
  • AWS Secrets Manager
  • Azure Key Vault
  • And others
Credentials used in rulebook activations can be fetched dynamically from these providers.

See also: Enhanced Kafka Integration for Event-Driven Ansible in AAP 2.6

Enhanced Design and Control for EDA Projects

FeatureDescription
Editable project Source Control URLsChange SCM URLs without recreating projects
EDA job labelingMore efficient tracing and auditability
Kafka: Multiple topicsSubscribe to multiple Kafka topics per rulebook
Kafka: Extended regex and wildcardsPattern-match topic names
New event-splitterHandle nested events in a single webhook payload
Rulebook concurrency keyGroup events by resource to prevent race conditions
mTLS supportMutual TLS for secure event source connections
Pull policy parityDecision environments follow the same pull policies as execution environments

Kafka Enhancements

# Multiple topics with wildcard matching
- name: Monitor infrastructure events
  hosts: all
  sources:
    - ansible.eda.kafka:
        host: kafka.example.com
        port: 9093
        topic: "infra-.*"
        group_id: eda-consumer
        security_protocol: SSL
        ssl_cafile: /certs/ca.pem
        ssl_certfile: /certs/client.pem
        ssl_keyfile: /certs/client-key.pem
  rules:
    - name: Handle server alerts
      condition: event.payload.severity == "critical"
      action:
        run_job_template:
          name: "Auto-Remediate"
          organization: "IT Ops"

mTLS Configuration

# Secure webhook source with mTLS
- name: Secure event ingestion
  hosts: all
  sources:
    - ansible.eda.webhook:
        host: 0.0.0.0
        port: 5000
        certfile: /certs/server.pem
        keyfile: /certs/server-key.pem
        cafile: /certs/ca.pem
        verify_client: true

See also: Event-Driven Ansible Migration Guide: From ansible.eda to eda.builtin and community.eda (AAP 2.7)

Splunk: Full Support

  • Splunk Enterprise Security — incident workflows
  • Splunk IT Service Intelligence (ITSI) — predictive anomaly detection with EDA
  • Splunk Enterprise — Universal Forwarder lifecycle management
  • Cisco Open Telemetry Collector — open telemetry for Splunk

Microsoft and Cloud

  • Microsoft System Center Operations Manager (SCOM) — Azure and Windows monitoring with EDA alert routing
  • Amazon.ai — DevOps Guru support for EDA event sources

Example: Splunk ITSI → EDA → Auto-Remediation

- name: Splunk ITSI closed-loop remediation
  hosts: all
  sources:
    - ansible.eda.webhook:
        host: 0.0.0.0
        port: 5000
  rules:
    - name: ITSI notable event - high CPU
      condition: >
        event.payload.source == "splunk_itsi" and
        event.payload.severity >= 4
      action:
        run_job_template:
          name: "Remediate High CPU"
          organization: "IT Operations"
          job_args:
            extra_vars:
              target_host: "{{ event.payload.host }}"
              alert_id: "{{ event.payload.notable_event_id }}"

FAQ

What is the event bus in EDA?

The event bus is a message broker layer between event sources and the EDA controller. Azure Event Grid and AWS EventBridge are now supported alongside Kafka.

Does mTLS work with all event sources?

mTLS is supported for webhook-based event sources. Kafka sources use their own SSL/TLS configuration via security_protocol.

Can I use multiple secrets managers simultaneously?

Yes. Different rulebook activations can reference different credential types backed by different secrets providers.

What changed in decision environments?

Decision environments now follow the same container pull policies as execution environments, and include the streamlined ansible.eda collection.

See also: Event-Driven Ansible Enhancements in AAP 2.6 — What's New

Category: events

Browse all Ansible tutorials · AnsiblePilot Home