Add state, gates, and visibility to Ansible.

Run ansible-playbook from cron, webhooks, or any HTTP signal. Add step-level retries, parsed per-host results via the Kestra callback, approval gates between waves, and chain Ansible with Terraform, NetBox, or ServiceNow in one execution history.

Around every playbook, every host, every wave.

What Kestra wraps around your Ansible runs: when playbooks fire, what comes back per host through the callback, who approves the next wave, and where the audit lives. Your playbooks, roles, inventory, and Vault stay where they are.

Schedule and event triggers wrapped around ansible-playbook

Native cron, fixed intervals, webhooks, S3 file arrivals, Kafka messages, and database row changes all fire ansible-playbook directly. The trigger payload reaches the flow as trigger.body, so the right host gets the right --extra-vars from a single execution. No AWX, no Tower, no EDA controller.

Check mode + diff mode as drift detection

Run the playbook with --check --diff on a nightly schedule. The Kestra Ansible callback emits per-host changes, the flow surfaces only the hosts that drifted, and the diff lands in Slack. No enforcement, no surprises, the whole fleet audited overnight.

Inventory built at run time from Terraform, NetBox, or vCenter

A terraform output, a NetBox API call, or vmware.vcenter.ListVms writes the inventory at the start of the flow. The next task templates it into inventory.ini. No stale static inventory file, no manual sync between source of truth and what Ansible reads.

Per-host results from the Kestra Ansible callback, iterable in YAML

The Kestra Ansible callback emits structured per-host outputs after each play. A ForEach task loops over the hosts and branches on changed, failed, or any fact. Route alerts by tag, hand failing hosts to a remediation flow, or upload the play recap to S3.

Rolling restarts with serial + health verification between batches

Set serial: 1 (or 10%) in the play. The playbook runs against one batch at a time. Between batches, a Kestra HTTP probe checks the service is healthy. A failed probe halts the flow before the next batch, preserving the rest of the fleet.

Replay any host from any past execution

Every play, every host, every task output is stored per execution. Open last week's run, click into the failing host, replay that step against the same target. The original inventory, vars, and ansible.cfg are preserved with the run, so the replay matches the original conditions.

How platform teams use Ansible and Kestra

Patterns infrastructure teams run in production today. Each one shows the flow end to end, with the real plugin classes in play.

Drift detection

Nightly check-mode audit, alert only on drift

Run the playbook with --check --diff against the fleet on a nightly schedule. The Kestra Ansible callback emits structured per-host output. A ForEach loops through hosts and posts a Slack alert only when a host comes back with changed: true. Clean runs stay quiet, the play recap stays attached to the execution for audit.

Check mode runs are non-destructive

--check + --diff reports what would change without touching the host.

Callback emits structured outputs

The Kestra Ansible callback writes per-host JSON the flow can iterate with ForEach.

Alert only on changed=true

Keeps Slack quiet on clean nights, surfaces only the hosts that drifted.

Full play recap stored per run

Every nightly audit is timestamped, attributed, and replayable from the execution UI.

What you get

Published as the ansible-config-drift blueprint in the Kestra catalog.

cron trigger
nightly
ansible-playbook --check
diff mode
ForEach host
per-host change?
alert
only on drift
Rolling wave

Rolling OS patch wave with serial + HTTP health probe between batches

ansible-playbook with serial: 1 patches one host at a time. Between batches, a Kestra core.http.Request task probes the application health endpoint. If the probe fails, the flow halts before the next batch and pages on-call. No half-broken fleet, no manual stop-the-pipeline.

serial picks the batch size

serial: 1, serial: 10%, or a mix. Ansible enforces the batching, Kestra runs the verify task per batch.

HTTP probe gates the next batch

core.http.Request with a retry policy decides whether the wave continues.

Halt on failure preserves the rest of the fleet

The flow exits before the next batch, the unpatched hosts stay on the old version.

Per-batch execution log

Each batch has its own log line in the execution, with the host list and the probe result.

patch window
scheduled
ansible-playbook serial: 1
one host at a time
ForEach host
verify between batches
health probe
halt on fail
notify
Slack on halt
Event-driven

Event-triggered remediation from monitoring alerts

A Splunk or CloudWatch alert fires on high CPU or a failed health check. The webhook hits Kestra, Kestra runs the remediation playbook against the affected host (inline inventory built from the alert payload), updates the ServiceNow incident with the playbook output, and posts to Slack. Same flow, same audit trail, whether the alert fires once a week or a hundred times a day.

Webhook + API triggers

Fire a playbook from Splunk, PagerDuty, ServiceNow, or any HTTP source. No glue service required.

Inline inventory from alert payload

The host name from trigger.body becomes a one-line inventory.ini, scoped to the affected host only.

Incident enrichment

Push the playbook's diagnostic output back into the ServiceNow ticket as a work note.

Replay on the same host

Re-run the playbook against the original target with one click from the execution view.

webhook
alert payload
ansible-playbook
remediate host
ServiceNow
update incident
notify
Slack
Dynamic inventory

Inventory from NetBox or Terraform output, then play against it

terraform output or a NetBox device query emits the inventory at the start of the flow. The next task templates it into inventory.ini (or hands it as a JSON dynamic inventory). The playbook runs against the freshly resolved hosts. No stale static inventory file, no manual sync between source of truth and Ansible.

Single source of truth

The inventory comes from the tool that actually knows the hosts: Terraform state, NetBox DCIM, or a cloud API.

Templated into inventory.ini per run

Inline inputFiles writes the inventory from outputs.fetch_inventory at the start of the playbook task.

Refresh per execution

Every run sees the current state, not yesterday's snapshot.

trigger
schedule or webhook
fetch inventory
Terraform / NetBox
ansible-playbook
fresh inventory
ForEach host
per-host result
ServiceNow
CMDB reconcile
The orchestration of Ansible is very poor compared to what we can do with Kestra. I doubt that we can only use Terraform and Ansible to do all our complex orchestration.
Crédit Agricole

Blueprints for Ansible orchestration.

One blueprint per use case above. Copy the YAML, point it at your inventory, ship it.

Check-mode drift detection
Rolling patch wave
Dynamic inventory from NetBox

Nightly check-mode audit with the Kestra Ansible callback

Runs the playbook with --check --diff nightly. The Kestra Ansible callback emits per-host structured output. A ForEach loops through hosts and posts a Slack alert only when changed: true. Clean enforcement runs stay quiet.

Explore Blueprints

Rolling OS patch wave with serial and per-batch health probe

ansible-playbook runs with serial: 1 to patch one host at a time. Between batches a Kestra core.http.Request probes the application health endpoint. A failed probe halts the flow before the next batch.

Explore Blueprints

Build inventory from NetBox at run time, then play against it

Queries NetBox for the device list at the start of the flow, writes inventory.ini from the result, then runs ansible-playbook against the fresh inventory. The same execution updates the ServiceNow CMDB with the per-host result.

Explore Blueprints

Kestra vs Ansible orchestration alternatives

Capability
Ansible Automation Platform
GitHub Actions
Rundeck
Check-mode drift detection with per-host alerting
Native, Kestra Ansible callback parses changed=true per host
Survey-driven runs, no native drift loopPossible via shell + stdout parsingPossible via job steps, manual parse
Rolling restart with serial + per-batch health probe
<code>core.http.Request</code> between batches halts on failure
serial works, verify needs custom pluginserial works, verify is a custom stepManual orchestration
Dynamic inventory from Terraform, NetBox, vCenter, cloud APIs
Native plugin tasks emit inventory at run time
AAP inventory plugins (config-managed)Custom shell to build inventoryResource model plugin
Per-host result parsing via callback
Kestra Ansible callback, structured outputs iterable in YAML
AAP run history, harder to chain downstreamstdout parsing in shellJob log parsing
Wave gating between dev / staging / prod
Native Pause + resume, named reviewer logged
Workflow approval (paid tiers)Environment approvals (deploy only)Pause-on-input step
Event triggers (webhook, S3, Kafka, file)
Native, cross-source
EDA controller add-onWebhook events on the repoWebhook only
Ansible Vault decryption from secrets backend
Vault file mounted from secrets at run time
Built-in credential storeSecrets in env, manual mountKey Storage Service
Chain Ansible with Terraform / NetBox / ServiceNow / ArgoCD
Native plugin tasks, outputs flow forward
Possible via collectionsPossible via actions and glueJob steps, manual wiring
Air-gapped / private network deploy
Self-hosted by default
Self-hosted (Red Hat subscription)Self-hosted runnersSelf-hosted
Orchestrate beyond Ansible
1300+ plugins, cross-stack
Ansible-centricPossible, action-dependentPossible, plugin-dependent

Ansible & Kestra: common questions

Find answers to your questions right here, and don't hesitate to Contact Us if you couldn't find what you're looking for.

See How

Ready to orchestrate your Ansible playbooks?

Drive check-mode drift detection, gate patch waves, build inventory from Terraform or NetBox, and parse per-host results with the Kestra Ansible callback. Open source, self-hosted, event-driven.