Targeted Execution, Tags & Resumption
Run selective Ansible tasks with visual AST inspection, tag filtering, one-click task resumption, and runtime engine isolation in CIEL.
Production automation playbooks routinely span dozens of tasks: backing up persistent storage, pulling container images, configuring systemd daemons, provisioning vector databases, and warming up HTTP caches. Running an entire multi-tier playbook from start to finish when you only need to restart a service or patch a single configuration file increases blast radius and wastes valuable maintenance window minutes.
In standard CLI environments or traditional web UIs, running a subset of tasks forces operators to construct command-line flags from memory. If you misspell a tag or miss a single space in a task name, Ansible silently skips execution or aborts unexpectedly.
CIEL resolves this with the Run Playbook with Custom Options console. By parsing playbook YAML into an interactive Abstract Syntax Tree (AST) before execution begins, CIEL eliminates guesswork and turns complex task targeting into a point-and-click workflow.
1. The Architectural Shift: Visual AST vs. Blind CLI Inputs
Most Ansible management interfaces (including Ansible AWX/Tower and Semaphore UI) treat runtime task targeting as an afterthought. Their execution prompts provide basic, unvalidated string input boxes for --tags and --start-at-task.
This traditional approach introduces serious operational friction:
- Zero Context Awareness: The UI has no knowledge of what tasks or tags exist inside your playbook. If you forget whether the tag was named
db_backup,backup_db, orbackup, you must exit the launch screen, open the raw YAML in another tab, and cross-reference lines manually. - Typo Vulnerability: If you make a typo in
--start-at-task(such as a missing capital letter or trailing whitespace), Ansible executes every task up to the end without matching anything, or aborts halfway through. - No Preflight Visibility: You cannot see which tasks will be skipped until you trigger the job and inspect stdout logs line by line.
How CIEL Approaches Playbook Execution
CIEL inspects your playbook via an AST engine on the controller:
- Automatic Tag Discovery: Every tag assigned at the play or task level is parsed and indexed into clickable badges.
- Visual Hierarchy Tree: Tasks are enumerated in exact execution sequence, labeled with their underlying module (
ansible.builtin.command,ansible.builtin.copy,ansible.builtin.service). - Point-and-Click Parameter Binding: Clicking a tag immediately appends it to
--tagsor--skip-tags. ClickingStart Hereon any task writes the exact task name into--start-at-taskwithout clipboard round-trips. - Targeted State Preview: Tasks that do not match active tag filters are visually dimmed and labeled
(not targeted), showing you the exact execution blast radius before you commit.
2. Dialog Anatomy & Parameter Controls
When you click Run Options... from the Studio workbench toolbar or the Playbooks catalog, CIEL opens a two-column execution modal:
Left Column: Runtime Options & CLI Arguments
- Target Host / Scope: Select the target machine (for example,
prod-api-01 (10.10.10.21)) or an entire inventory group. - Execution Engine:
- Native Mode: Runs
ansible-playbookdirectly on the CIEL controller host using the system Python environment. Ideal for lightweight preflights, fact gathering, and direct server configuration. - Podman Container: Dispatches execution into an isolated container runner. Mounts temporary project directories and SSH credentials into sandboxed volumes with automatic cleanup on exit.
- Native Mode: Runs
- Include Tags (
--tags): Filters execution strictly to tasks bearing these tags (e.g.reranker). - Skip Tags (
--skip-tags): Excludes matching tasks from execution (e.g.preflight,backup). - Start at Task (
--start-at-task): Resumes execution beginning at the specified task name. - Variable Sets & Extra Vars: Attach workspace variable sets or pass runtime JSON/YAML variable overrides that take precedence over defaults.
Right Column: AST Inspector & Discovered Tags
- Playbook Structure Header: Summarizes playbook volume (e.g.,
3 plays · 21 tasks · 13 tags). - Active Execution Selections: High-contrast badges displaying active filters with instant remove (
×) toggles and a Clear All action. - Discovered Tags: Interactive pills for all extracted tags. Clicking a tag badge sets it in
--tags; clicking the companionskiptoggle sends it to--skip-tags. - Plays & Task Hierarchy: Searchable list with a real-time
Filter tasks...query input. Each task card displays its sequence number, name, target status, Ansible module, and interactiveStart Heretrigger.
3. One-Click Task Resumption (--start-at-task)
Consider a production deployment playbook containing 21 tasks across database backups, AI model inference deployment, and edge proxy configuration:
- name: Database & Persistent Storage Backup
hosts: all
tags: [backup, database]
tasks:
- name: Check available disk space and memory headroom
ansible.builtin.command: df -h /var/lib/containers
tags: [preflight, healthcheck]
- name: Backup database from podman container
ansible.builtin.command: >-
podman exec postgres-db pg_dump -U postgres -d app_production -F c -f /tmp/backup.dump
tags: [backup, database]
- name: Vector Search & AI Inference Engine
hosts: all
tags: [qdrant, reranker, ai]
tasks:
- name: Pull optimized Qdrant vector database container image
ansible.builtin.command: podman pull docker.io/qdrant/qdrant:v1.16.2
tags: [qdrant, ai]
- name: Deploy Reranker FastAPI inference daemon
ansible.builtin.copy:
dest: /opt/ai-inference/server.py
src: files/server.py
mode: "0644"
tags: [reranker, ai]
- name: Enable and start Reranker inference service
ansible.builtin.service:
name: reranker
state: started
enabled: true
tags: [reranker, ai]The Failure & Recovery Scenario
- You run the playbook, and task #12 (
Deploy Reranker FastAPI inference daemon) fails because a destination directory had incorrect ownership. - In AWX or raw CLI, you would either re-run the entire playbook from step 1 (repeating database snapshots and container image pulls), or copy the exact task string into a terminal flag.
- In CIEL:
- Fix the underlying directory issue in the Studio Web SSH terminal.
- Open Run Options....
- Scroll to task #12 in the AST Inspector.
- Click
Start Here. - CIEL populates
--start-at-task: Deploy Reranker FastAPI inference daemoninto the form. - Click Run Live.
CIEL immediately skips tasks 1 through 11 and starts execution directly at task #12.
4. Selective Tag Execution (--tags & --skip-tags)
Tags allow you to isolate specific operational subsystems without breaking your playbook into dozens of fragmented files.
Workflow Patterns:
- Isolated AI Component Deployment:
Clicking the
rerankerbadge in the AST Inspector automatically setsInclude Tags: reranker. All unrelated plays (database dumps, Nginx configurations) are marked(not targeted)in the inspector and skipped by Ansible. - Bypassing Heavy Preflights During Incidents:
If a production incident requires an immediate service reload, click
skipnext tobackupandpreflight. CIEL populates--skip-tags: backup,preflight, allowing the service tasks to apply immediately. - Tag Inheritance:
Tags defined at the play level (
tags: [backup, database]) cascade to all child tasks inside that play. Task-level tags (tags: [healthcheck]) apply solely to that specific step.
5. Execution Runtime: Native Mode vs. Podman Container
CIEL lets you choose where and how the Ansible runner executes:
| Runtime Engine | Architecture | Use Case |
|---|---|---|
| Native Mode | Runs ansible-playbook directly on the CIEL controller host using the system Python environment. | Quick diagnostic checks, small infrastructure updates, or environments where container sockets are not accessible. |
| Podman Container | Runs ansible-playbook inside an isolated container image (e.g., quay.io/ansible/creator-ee). Mounts temporary project directories and SSH credentials into sandboxed volumes. | Production environments, automated multi-tenant workloads, and teams requiring strict dependency isolation. |
Both modes stream execution logs in real time over WebSocket, support ANSI color rendering, compute configuration diffs, and generate downloadable job artifacts.
6. Safe Validation with Dry Run (--check)
Before applying targeted changes to production hosts:
- Configure your target host, tags, and start task in the dialog.
- Click Dry Run in the modal footer.
- CIEL appends
--checkand--diffto the Ansible execution command. - Review the real-time event log to verify which tasks report
ok, which reportchanged, and what configuration line diffs would be committed. - If the dry run matches your expectation, open Run Options... and click Run Live.
7. Upstream Ansible References
For further details on Ansible tag syntax and command-line execution parameters:
- Ansible Tags Guide: Tagging plays and tasks, tag inheritance, and special tags (
always,never). - Ansible Check Mode: Predicting playbook execution effects with check and diff modes.
- Ansible Playbook Command-Line Options: CLI reference for
--tags,--skip-tags, and--start-at-task.