Playbooks & Execution•5 min read•Real-Time

Live Execution, Artifacts & Summary

Monitor Ansible executions in real time with WebSocket event streaming, structured task timelines, intra-line diffs, and downloadable runner artifacts.

When running automation playbooks across servers, raw terminal logs often leave you guessing what actually changed. A generic changed status confirms that a task executed, but it does not tell you whether an SSL certificate was replaced, which environment variable was updated, or how many microservice loop items completed successfully.

CIEL provides a real-time Job Execution View (/jobs/[id]) that combines WebSocket event streaming, structured task status cards, word-level file diffs, and persistent runner artifacts into a unified control console.

Live Ansible Execution Console with Task Timeline, Multi-Item Loop Status, and Job Actions

1. The Job Detail Workspace

The Job Detail interface tracks the full execution lifecycle of an Ansible run:

  • Header Metadata & Actions:
    • Displays the Job ID (e.g. 3cf6a723), execution status badge (successful, failed, or running), and target node.
    • Save as Run: Converts the exact parameters of this execution (target hosts, playbook, variable sets, extra variables, tags) into a reusable Saved Run for one-click re-execution.
    • Relaunch: Re-executes the job using the exact snapshot of files and parameters captured at launch time.
    • Rerun (Latest): Re-runs the job using the latest playbook content and active project variables.
    • Delete: Purges the job record and removes its temporary execution directory from the controller disk.
  • Three Core Workspace Tabs:
    • >_ Execution Log: The primary console featuring real-time WebSocket event streaming, per-task execution timers, and interactive task diffs.
    • Artifacts & Reports: File tree of raw Ansible Runner outputs (stdout, command, job_events/, fact caches).
    • Details: Playbook metadata, attached variable sets, initiator, runtime engine type, and exit code diagnostic explanations.

2. Real-Time WebSocket Streaming (>_ Execution Log)

When a job starts, CIEL launches an isolated Ansible Runner subprocess and streams task lifecycle events directly to the browser over a real-time WebSocket connection:

  • Zero-Polling Event Stream: Output lines and task state transitions stream immediately as the runner emits events.
  • Structured Task Cards:
    • Each task block displays its friendly name, target host (127.0.0.1), and execution duration (e.g. 4.03s, 3.99s, 0.52s).
    • Clear status badges distinguish between OK (green), Changed (orange cog), Failed (red cross), and Skipped.
  • Multi-Item Loop Tracking:
    • Tasks using loop or with_items (such as rolling out multiple microservice configuration files) expand into individual item cards.
    • Shows per-item parameters, target destination paths, byte sizes, and individual changed statuses (auth.env, payment.env, worker.env, notify.env).
  • Interactive Console Controls:
    • Toggle full-screen mode, reload the stream buffer, or clear the terminal pane.
    • Status footer reports total lines processed (e.g. 52 lines · done) and provides an interactive legend for quick reference.

3. Intra-Line Diffs & Change Tracking

When an automation updates configuration files on remote hosts (using modules like ansible.builtin.template, copy, or lineinfile), CIEL detects diff events emitted by --diff mode and flags them with a purple diff badge.

Clicking > details on a changed task reveals word-level and character-level comparisons:

  • Red Highlight: Removed configuration directives or previous values.
  • Green Highlight: Newly added lines or updated settings.
  • Exact Drift Prevention: You can immediately verify whether an Nginx directive changed from worker_processes 4; to worker_processes 8;, or confirm that an obsolete temporary directory was deleted (/tmp/ciel-diff-suite (absent)), without SSHing into the host to inspect files manually.

4. Ansible Runner Artifacts (Artifacts & Reports)

Every execution preserves raw Ansible Runner artifacts on disk under the job directory for post-mortem debugging and compliance:

  • Interactive File Tree:
    • stdout: Raw plain-text ANSI console stream with colored terminal codes.
    • command: The exact CLI command line, environment variables, and inventory paths passed to the runner.
    • job_events/: Raw JSON event records for every play, task, and host event.
    • rc: Return code file indicating final process status (0 for success).
  • Artifact Viewer Features:
    • Search within logs to isolate specific error strings or hostnames.
    • Line wrapping toggle and one-click copy to clipboard.
    • Download File: Download the currently selected artifact file (such as raw stdout, parsed command, or JSON event logs) directly to your local machine.

5. Execution Diagnostics & Exit Codes

Under the Details tab, CIEL automatically interprets the process exit code:

  • rc=0: All tasks executed successfully or were skipped intentionally.
  • rc=2: Playbook failed due to a task error on one or more hosts. CIEL extracts the exact error payload from the failing event into a prominent Diagnostic Notice with a one-click Copy Error button.
  • rc=4: One or more hosts were unreachable (SSH failure, connection timeout, or invalid authentication).
  • rc=250: Unexpected internal execution exception or runner initialization error.

6. External References

For upstream Ansible documentation on runner architecture, diffs, and loop structures: