Ansible-DAG-Harness

Multi AI & Developer Tools Website

A disposable self-bootstrapping LangGraph DAG harness for boxing up Ansible iteration cycles in GitLab

https://jesssullivan.github.io/Ansible-DAG-Harness/ →

Languages

Python 98.2% Shell 1.3% Just 0.3% Jinja 0.1% Nix 0.1%

README

DAG Harness

LangGraph DAG orchestration for Ansible role deployments with GitLab integration.

Features

  • 17-node workflow with parallel testing, HITL gates, recovery subgraph
  • 30 MCP tools across 9 categories for Claude Code integration
  • HOTL mode - Human Out of The Loop autonomous operation
  • Checkpointing - Resume from any node with SQLite persistence

Installation

# From source (recommended)
git clone https://github.com/Jesssullivan/dag-harness.git
cd dag-harness/harness
uv sync

# Or via pip
pip install git+https://github.com/Jesssullivan/dag-harness.git#subdirectory=harness

Usage

harness init                    # Initialize in repo
harness box-up-role <role>      # Execute workflow
harness status                  # Show status
harness hotl start              # Autonomous mode

Workflow

validate_role → analyze_deps → check_reverse_deps → create_worktree
                                                          ↓
run_molecule ─┬─→ merge_test_results → validate_deploy → create_commit
run_pytest  ──┘                                              ↓
                push_branch → create_issue → create_mr → human_approval
                                                              ↓
                              add_to_merge_train → report_summary
                                        ↓
                               [recovery subgraph on failure]

17 nodes: validate_role, analyze_deps, check_reverse_deps, create_worktree, run_molecule, run_pytest, merge_test_results, validate_deploy, create_commit, push_branch, create_issue, create_mr, human_approval, add_to_merge_train, report_summary, notify_failure, recovery

MCP Tools

30 tools defined in harness/mcp/server.py:

Category Count
role_management 7
workflow 5
agent 6
worktree 3
costs 3
testing 2
search 2
credentials 1
merge_train 1

Configuration

# harness.yml
db_path: harness.db
repo_root: /path/to/ansible/roles

gitlab:
  project_path: group/project
  default_assignee: username

worktree:
  base_path: /path/to/worktrees
  branch_prefix: feature/

Requirements

  • Python 3.11+
  • Git with worktree support
  • GitLab API access (GITLAB_TOKEN)

Tests

cd harness
uv run pytest                           # 1667 tests
uv run pytest -m "not integration"      # Unit tests only
uv run pytest -m pbt                    # Property-based tests

Documentation

License

MIT

langgraphdagansible