Skip to main content
Glama

SousChef: Multi-Platform to Ansible Migration + Ansible Upgrade Planning

Transform Chef, SaltStack, Puppet, PowerShell, and Bash automation to Ansible, and plan Ansible version upgrades. Works with any AI assistant via MCP (Model Context Protocol)—Claude, GPT-4, GitHub Copilot, Red Hat AI, local models, and more.

Quick Facts: MIT License | Python 3.10+ | 105 MCP Tools | Test coverage reported by CI

The optional web UI and Pillow-dependent development packages require Python 3.11+. Core MCP server support remains Python 3.10+.

GitHub release Python Version License: MIT Test Coverage Code style: Ruff Type Checked: mypy Quality Gate Status Security Rating Maintainability Rating


Warning I did not hand craft 100k lines of code in two days while doing my actual day job (which, for the record, isn’t this). A lot of this is AI generated. Architected, hand edited, and personally sworn at yes, but the heavy hand of AI is all over this repo.

I’ve pushed it to include a lot of tests, and I run it through its paces before pushing, but some things may break, or may have always been broken. If you find something, raise it and I’ll fix it.

A fair bit of this relies on mocked Chef/AWX/AAP APIs because shockingly I don’t have a fleet of enterprise grade installs with enterprise grade data sitting around to test against. Buyer beware (doubly so, since you didn’t actually buy anything).


What It Does

Chef-to-Ansible Migration — Convert cookbooks, recipes, custom resources, data bags, and Habitat plans to Ansible playbooks, roles, and containers. Supports infrastructure, applications, and day-2 operations.

SaltStack-to-Ansible Migration — Convert Salt states, pillars, and top.sls targeting to Ansible roles, variable files, Ansible Vault, and INI inventory. Assess complexity, generate phased migration plans, and produce executive reports.

Puppet to Ansible Migration — Convert Puppet manifests and module directories to Ansible playbooks using idiomatic ansible.builtin modules. Recognises 14 Puppet resource types; maps 10 to Ansible modules with AI-assisted conversion for complex constructs.

PowerShell to Ansible Migration — Convert Windows PowerShell provisioning scripts to idiomatic ansible.windows playbooks, roles, WinRM inventories, and AWX/AAP job templates.

Bash Script Migration — Convert provisioning Bash scripts to Ansible playbooks and roles with quality scoring, sensitive data detection, and AAP readiness hints.

Ansible Upgrade Planning — Assess compatibility, plan version upgrades, validate collections, identify breaking changes, and generate testing strategies.

Related MCP server: AAP MCP Server

Installation & Setup

# Install from PyPI
pip install mcp-souschef

# Configure your MCP client (Claude Desktop example)
cp config/claude-desktop.json ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Restart your AI assistant and start using
# Ask: "What migration tools are available?"

Other MCP clients: See config/CONFIGURATION.md for VS Code Copilot, custom setups, and Docker deployment.

Production containers use isolated, wheel-only dependencies and omit pip and Poetry. Rebuild images to change dependencies; see the container dependency policy.

Key Features

  • 105 registered MCP tools for Chef migration, SaltStack migration, Puppet migration, PowerShell migration, Bash script migration, and Ansible upgrades

  • Web UI with interactive migration planner and visualisation (including Salt, Puppet, PowerShell, and Bash tabs)

  • CLI for automation and CI/CD integration

  • Production-ready with 99% test coverage and comprehensive validation

  • Model-agnostic — works with any AI assistant supporting MCP

  • Chef Server ingestion with dependency closure and offline bundle export

Common Use Cases

Chef Migration:

  • Convert cookbooks to Ansible playbooks and roles

  • Migrate Chef Habitat apps to Docker containers

  • Transform data bags to Ansible Vault

  • Generate AWX/AAP job templates and workflows

  • Convert InSpec tests to Ansible validation tasks

  • Fetch cookbooks from Chef Server with run_list or policy selection

SaltStack Migration:

  • Parse SLS state files and extract states, pillars, and grain references

  • Convert Salt states to Ansible playbooks and role task files

  • Migrate pillar data to Ansible group_vars/ and Ansible Vault

  • Generate Ansible inventory from top.sls targeting rules

  • Batch-convert a full Salt state tree to an Ansible roles structure

  • Assess migration complexity and generate phased migration plans

Puppet Migration:

  • Convert Puppet manifests (.pp) and module directories to Ansible playbooks

  • Recognise 14 Puppet resource types; map 10 to idiomatic ansible.builtin modules (package, service, file, user, group, exec, cron, host, mount, ssh_authorized_key)

  • Warn about unsupported constructs (Hiera lookups, exported resources, create_resources) with manual-review guidance

  • AI-assisted conversion for complex Puppet DSL that cannot be mapped automatically

  • Convert individual Puppet resource declarations to standalone Ansible tasks

PowerShell Migration:

  • Convert Windows PowerShell provisioning scripts to idiomatic Ansible playbooks

  • Generate full Ansible roles with WinRM inventory and group_vars

  • Map 28+ PowerShell patterns to ansible.windows.*, community.windows.*, chocolatey.chocolatey.*

  • Generate AWX/AAP Windows job templates with WinRM credentials

  • Analyse migration fidelity (0–100 %) with actionable recommendations

  • Create complete requirements.yml for required Windows collections

Bash Script Migration:

  • Convert provisioning Bash scripts to idiomatic Ansible playbooks

  • Generate full Ansible roles from Bash scripts (tasks, handlers, defaults, meta)

  • Detect and flag hardcoded secrets with ansible-vault guidance

  • Identify CM escape calls (Salt, Puppet, Chef) embedded in Bash

  • Get AAP-ready job template hints with Execution Environment recommendations

  • Score migration quality (A–F) with ranked improvement suggestions

Ansible Upgrades:

  • Assess Python and Ansible version compatibility

  • Plan upgrades with breaking change analysis

  • Validate collection compatibility

  • Generate testing strategies

  • Track end-of-life dates

Both Infrastructure & Applications:

  • Infrastructure provisioning and configuration

  • Application deployment automation

  • Day-2 operations (backups, scaling, updates)

  • CI/CD pipeline migration

  • Multi-cloud automation

Command-Line Examples

# Chef migration
souschef-cli recipe /path/to/recipe.rb
souschef-cli template /path/to/template.erb
souschef-cli convert package nginx --action install

# SaltStack migration
souschef-cli salt assess /srv/salt/states/
souschef-cli salt convert /srv/salt/states/webserver/init.sls
souschef-cli salt inventory /srv/salt/top.sls
souschef-cli salt batch-convert /srv/salt/states/ --output-dir ./ansible-roles/

# PowerShell migration
souschef-cli powershell-parse scripts/setup.ps1
souschef-cli powershell-convert scripts/setup.ps1 --output playbook.yml
souschef-cli powershell-role scripts/setup.ps1 --output-dir ./ansible-role

# Puppet migration
souschef-cli puppet parse manifests/site.pp
souschef-cli puppet convert manifests/site.pp --output playbook.yml
souschef-cli puppet convert-module modules/myapp --output-dir ./ansible-role

# Bash script migration
souschef bash parse scripts/bootstrap.sh
souschef bash convert scripts/deploy.sh --output playbook.yml
souschef bash role scripts/setup.sh --role-name myapp --output-dir ./roles

# Ansible upgrades
souschef ansible assess --environment-path /path/to/ansible
souschef ansible plan --current 2.9 --target 2.17
souschef ansible validate-collections --requirements-file requirements.yml

# Web UI
souschef ui  # Launch interactive dashboard

REST API v1 (Migration Workflow)

SousChef includes a lightweight HTTP API for programmatic execution.

# List generic operation names
curl -s http://127.0.0.1:8081/api/v1/operations

# Analyse migration complexity (dedicated endpoint)
curl -s -X POST http://127.0.0.1:8081/api/v1/migration/analyse \
 -H "Content-Type: application/json" \
 -d '{
  "cookbook_paths": ["/workspaces/souschef/tests/integration/fixtures/sample_cookbook"],
  "migration_scope": "full",
  "target_platform": "ansible_awx"
 }'

# Generate playbook from a recipe (dedicated endpoint)
curl -s -X POST http://127.0.0.1:8081/api/v1/migration/generate-playbook \
 -H "Content-Type: application/json" \
 -d '{
  "recipe_path": "/workspaces/souschef/tests/integration/fixtures/sample_cookbook/recipes/default.rb",
  "cookbook_path": "/workspaces/souschef/tests/integration/fixtures/sample_cookbook"
 }'

# Generate migration plan (dedicated endpoint)
curl -s -X POST http://127.0.0.1:8081/api/v1/migration/plan \
 -H "Content-Type: application/json" \
 -d '{
  "cookbook_paths": ["/workspaces/souschef/tests/integration/fixtures/sample_cookbook"],
  "migration_strategy": "phased",
  "timeline_weeks": 12
 }'

# Validate conversion output with profile-based filtering
curl -s -X POST http://127.0.0.1:8081/api/v1/validation/profile \
 -H "Content-Type: application/json" \
 -d '{
  "conversion_type": "recipe",
  "result_content": "- hosts: all\n  tasks: []",
  "validation_profile": "moderate"
 }'

# Query migration capability context (keyword, vector, or hybrid retrieval)
curl -s -X POST http://127.0.0.1:8081/api/v1/context/query \
 -H "Content-Type: application/json" \
 -d '{
  "query": "migration plan timeline",
  "top_k": 5,
  "cookbook_path": "/workspaces/souschef/tests/integration/fixtures/sample_cookbook",
  "retrieval_mode": "hybrid"
 }'

# Stream context matches as server-sent events
curl -N -X POST http://127.0.0.1:8081/api/v1/context/query/stream \
 -H "Content-Type: application/json" \
 -d '{
  "query": "migration plan timeline",
  "top_k": 3
 }'

# Stream validation profile results as server-sent events
curl -N -X POST http://127.0.0.1:8081/api/v1/validation/profile/stream \
 -H "Content-Type: application/json" \
 -d '{
  "conversion_type": "recipe",
  "result_content": "- hosts: all\n  tasks: []",
  "validation_profile": "safety"
 }'

Request guardrails: per-route payload limits return 413, and operation timeouts return 408. Route resolution occurs before payload validation, so unknown routes return 404 even when a body would exceed endpoint payload limits.

Start the API server from the CLI:

souschef api serve --host 127.0.0.1 --port 8081

Validation profiles: basic, moderate, safety, shared, production.

Documentation

Start Here

Reference

Recent Updates

v7.0.0 — First-class multi-platform migration documentation for SaltStack, Bash, PowerShell, and Puppet

v6.0.0 — v2 core foundation with enhanced migration capabilities

v5.1.4 — Modular architecture, 91% test coverage, full type safety, production-ready

v5.0.0 — Complete Ansible upgrade planning with version matrices and EOL tracking

Contributing

# Development setup
git clone https://github.com/kpeacocke/souschef.git && cd souschef
poetry install
poetry run pytest           # Run tests
poetry run ruff check .     # Lint
poetry run mypy souschef    # Type check

# If you change terraform-provider/
cd terraform-provider
go test ./...               # Run Go tests

Standards: Zero warnings policy, type hints required, 90%+ test coverage, Australian English spelling.

See CONTRIBUTING.md for complete guidelines.

Support

License

MIT License — see LICENSE for details.

Available Tools

34 tools
analyze_chef_application_patternsC

Analyze Chef cookbook for application deployment patterns and provide migration recommendations.

Args: cookbook_path: Path to Chef application cookbook application_type: Type of application (web_application, microservice, database, etc.)

Returns: Analysis of deployment patterns with Ansible migration recommendations

Inputs: cookbook_path (required), application_type. Returns: result

analyze_chef_databag_usageA

Analyze Chef cookbook for data bag usage and provide migration recommendations.

Args: cookbook_path: Path to Chef cookbook databags_path: Optional path to data_bags directory for cross-reference

Returns: Analysis of data bag usage and migration recommendations

Inputs: cookbook_path (required), databags_path. Returns: result

analyze_chef_environment_usageC

Analyze Chef cookbook for environment usage and provide migration recommendations.

Args: cookbook_path: Path to Chef cookbook environments_path: Optional path to environments directory for cross-reference

Returns: Analysis of environment usage and migration recommendations

Inputs: cookbook_path (required), environments_path. Returns: result

analyze_chef_search_patternsC

Analyze Chef recipes/cookbooks to extract search patterns for inventory planning.

Args: recipe_or_cookbook_path: Path to Chef recipe file or cookbook directory.

Returns: JSON string with discovered search patterns and recommended inventory structure.

Inputs: recipe_or_cookbook_path (required). Returns: result

analyze_cookbook_dependenciesC

Analyze cookbook dependencies and identify migration order requirements.

Args: cookbook_path: Path to Chef cookbook or cookbooks directory dependency_depth: Analysis depth (direct, transitive, full)

Returns: Dependency analysis with migration order recommendations

Inputs: cookbook_path (required), dependency_depth. Returns: result

assess_chef_migration_complexityC

Assess the complexity of migrating Chef cookbooks to Ansible with detailed analysis.

Args: cookbook_paths: Comma-separated paths to Chef cookbooks or cookbook directory migration_scope: Scope of migration (full, recipes_only, infrastructure_only) target_platform: Target platform (ansible_awx, ansible_core, ansible_tower)

Returns: Comprehensive migration complexity assessment with recommendations

Inputs: cookbook_paths (required), migration_scope, target_platform. Returns: result

convert_chef_databag_to_varsB

Convert Chef data bag to Ansible variables format.

Args: databag_content: JSON content of the Chef data bag databag_name: Name of the data bag item_name: Name of the data bag item (default: "default") is_encrypted: Whether the data bag is encrypted target_scope: Variable scope ("group_vars", "host_vars", or "playbook")

Returns: Ansible variables YAML content or vault file structure

Inputs: databag_content (required), databag_name (required), item_name, is_encrypted, +1 more. Returns: result

convert_chef_deployment_to_ansible_strategyA

Convert Chef application deployment recipe to Ansible deployment strategy.

Args: deployment_recipe_path: Path to Chef deployment recipe deployment_pattern: Chef deployment pattern (blue_green, rolling, canary, auto_detect) target_strategy: Target Ansible strategy (rolling_update, blue_green, canary)

Returns: Ansible playbook with deployment strategy implementation

Inputs: deployment_recipe_path (required), deployment_pattern, target_strategy. Returns: result

convert_chef_environment_to_inventory_groupA

Convert Chef environment to Ansible inventory group with variables.

Args: environment_content: Ruby content of the Chef environment file environment_name: Name of the Chef environment include_constraints: Whether to include cookbook version constraints

Returns: Ansible inventory group configuration with variables

Inputs: environment_content (required), environment_name (required), include_constraints. Returns: result

convert_chef_search_to_inventoryA

Convert a Chef search query to Ansible inventory patterns and groups.

Args: search_query: Chef search query (e.g., "role:web AND environment:production").

Returns: JSON string with Ansible inventory patterns and group definitions.

Inputs: search_query (required). Returns: result

convert_inspec_to_testC

Convert InSpec controls to Ansible test format.

Args: inspec_path: Path to InSpec profile or control file. output_format: Output format ('testinfra' or 'ansible_assert').

Returns: Converted test code or error message.

Inputs: inspec_path (required), output_format. Returns: result

convert_resource_to_taskB

Convert a Chef resource to an Ansible task.

Args: resource_type: The Chef resource type (e.g., 'package', 'service'). resource_name: The name of the resource. action: The Chef action (e.g., 'install', 'start', 'create'). Defaults to 'create'. properties: Additional resource properties as a string representation.

Returns: YAML representation of the equivalent Ansible task.

Inputs: resource_type (required), resource_name (required), action, properties. Returns: result

generate_ansible_vault_from_databagsB

Generate Ansible Vault files from Chef data bags directory.

Args: databags_directory: Path to Chef data_bags directory output_directory: Target directory for Ansible variables (group_vars/host_vars) encryption_key_hint: Hint for identifying encrypted data bags

Returns: Summary of converted data bags and instructions

Inputs: databags_directory (required), output_directory, encryption_key_hint. Returns: result

generate_awx_inventory_source_from_chefB

Generate AWX/AAP inventory source from Chef server configuration.

Args: chef_server_url: Chef server URL for inventory sync organization: AWX organization name sync_schedule: Inventory sync schedule (hourly, daily, weekly)

Returns: AWX/AAP inventory source configuration for Chef server integration

Inputs: chef_server_url (required), organization, sync_schedule. Returns: result

generate_awx_job_template_from_cookbookB

Generate AWX/AAP job template configuration from Chef cookbook.

Args: cookbook_path: Path to Chef cookbook directory cookbook_name: Name of the cookbook for job template target_environment: Target environment for the job template include_survey: Whether to include survey spec for cookbook attributes

Returns: AWX/AAP job template JSON configuration

Inputs: cookbook_path (required), cookbook_name (required), target_environment, include_survey. Returns: result

generate_awx_project_from_cookbooksA

Generate AWX/AAP project configuration from Chef cookbooks directory.

Args: cookbooks_directory: Path to Chef cookbooks directory project_name: Name for the AWX project scm_type: SCM type (git, svn, etc.) scm_url: SCM repository URL

Returns: AWX/AAP project configuration with converted playbooks structure

Inputs: cookbooks_directory (required), project_name (required), scm_type, scm_url. Returns: result

generate_awx_workflow_from_chef_runlistC

Generate AWX/AAP workflow template from Chef runlist.

Args: runlist_content: Chef runlist content (JSON or comma-separated) workflow_name: Name for the workflow template environment: Target environment for workflow execution

Returns: AWX/AAP workflow template configuration with job dependencies

Inputs: runlist_content (required), workflow_name (required), environment. Returns: result

generate_blue_green_deployment_playbookB

Generate Ansible blue/green deployment playbook from application configuration.

Args: app_name: Name of the application to deploy service_config: JSON configuration for service setup health_check_url: URL endpoint for health checks

Returns: Complete blue/green deployment playbook with rollback capabilities

Inputs: app_name (required), service_config, health_check_url. Returns: result

generate_canary_deployment_strategyC

Generate Ansible canary deployment strategy with gradual rollout.

Args: app_name: Name of the application for canary deployment canary_percentage: Initial canary traffic percentage rollout_steps: Comma-separated rollout percentages

Returns: Canary deployment strategy with monitoring and automated rollback

Inputs: app_name (required), canary_percentage, rollout_steps. Returns: result

generate_dynamic_inventory_scriptA

Generate a Python dynamic inventory script from Chef search queries.

Args: search_queries: JSON string containing Chef search queries and group names.

Returns: Complete Python script for Ansible dynamic inventory.

Inputs: search_queries (required). Returns: result

generate_inspec_from_recipeA

Generate InSpec controls from a Chef recipe.

Args: recipe_path: Path to Chef recipe file.

Returns: InSpec control code or error message.

Inputs: recipe_path (required). Returns: result

generate_inventory_from_chef_environmentsB

Generate complete Ansible inventory from Chef environments directory.

Args: environments_directory: Path to Chef environments directory output_format: Output format ("yaml", "ini", or "both")

Returns: Complete Ansible inventory structure with environment-based groups

Inputs: environments_directory (required), output_format. Returns: result

generate_migration_planA

Generate a detailed migration plan from Chef to Ansible with timeline and milestones.

Args: cookbook_paths: Comma-separated paths to Chef cookbooks migration_strategy: Migration approach (big_bang, phased, parallel) timeline_weeks: Target timeline in weeks

Returns: Detailed migration plan with phases, milestones, and deliverables

Inputs: cookbook_paths (required), migration_strategy, timeline_weeks. Returns: result

generate_migration_reportC

Generate comprehensive migration report from assessment results.

Args: assessment_results: JSON string or summary of assessment results report_format: Report format (executive, technical, combined) include_technical_details: Include detailed technical analysis (yes/no)

Returns: Formatted migration report for stakeholders

Inputs: assessment_results (required), report_format, include_technical_details. Returns: result

generate_playbook_from_recipeA

Generate a complete Ansible playbook from a Chef recipe.

Args: recipe_path: Path to the Chef recipe (.rb) file.

Returns: Complete Ansible playbook in YAML format with tasks, handlers, and variables.

Inputs: recipe_path (required). Returns: result

list_cookbook_structureC

List the structure of a Chef cookbook directory.

Args: path: Path to the cookbook root directory.

Returns: Formatted string showing the cookbook structure.

Inputs: path (required). Returns: result

list_directoryC

List the contents of a directory.

Args: path: The path to the directory to list.

Returns: A list of filenames in the directory, or an error message.

Inputs: path (required). Returns: result

parse_attributesC

Parse a Chef attributes file and extract attribute definitions.

Args: path: Path to the attributes (.rb) file.

Returns: Formatted string with extracted attributes.

Inputs: path (required). Returns: result

parse_custom_resourceA

Parse a Chef custom resource or LWRP file.

Args: path: Path to the custom resource (.rb) file.

Returns: JSON string with extracted properties, actions, and metadata.

Inputs: path (required). Returns: result

parse_inspec_profileB

Parse an InSpec profile and extract controls.

Args: path: Path to InSpec profile directory or control file (.rb).

Returns: JSON string with parsed controls, or error message.

Inputs: path (required). Returns: result

parse_recipeB

Parse a Chef recipe file and extract resources.

Args: path: Path to the recipe (.rb) file.

Returns: Formatted string with extracted Chef resources and their properties.

Inputs: path (required). Returns: result

parse_templateA

Parse a Chef ERB template file and convert to Jinja2.

Args: path: Path to the ERB template file.

Returns: JSON string with extracted variables and Jinja2-converted template.

Inputs: path (required). Returns: result

read_cookbook_metadataC

Parse Chef cookbook metadata.rb file.

Args: path: Path to the metadata.rb file.

Returns: Formatted string with extracted metadata.

Inputs: path (required). Returns: result

read_fileC

Read the contents of a file.

Args: path: The path to the file to read.

Returns: The contents of the file, or an error message.

Inputs: path (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 34 tools

    Disambiguation3/5

    The tools have clear purposes focused on Chef-to-Ansible migration, but significant overlap exists between analysis tools (e.g., analyze_chef_application_patterns, analyze_chef_databag_usage, analyze_chef_environment_usage) and conversion tools (e.g., convert_chef_databag_to_vars, convert_chef_environment_to_inventory_group). While descriptions help differentiate, an agent might struggle to choose between similar analysis or conversion tools for specific migration tasks, leading to potential misselection.

    Naming Consistency4/5

    Most tools follow a consistent verb_noun pattern (e.g., analyze_chef_application_patterns, convert_chef_databag_to_vars, generate_ansible_vault_from_databags), which aids predictability. However, there are minor deviations like list_directory and read_file, which use simpler verbs without the domain prefix, slightly breaking the pattern but remaining readable overall.

    Tool Count2/5

    With 34 tools, the count is excessive for the Chef-to-Ansible migration domain. Many tools could be consolidated (e.g., multiple analysis and conversion tools overlap in functionality), making the set feel heavy and overwhelming. A more streamlined set of 10-20 tools would better serve the purpose without sacrificing coverage.

    Completeness5/5

    The tool set provides comprehensive coverage for Chef-to-Ansible migration, including analysis, conversion, generation of Ansible components (playbooks, inventory, vaults), integration with AWX/AAP, deployment strategies, and reporting. It supports full CRUD/lifecycle operations for the domain, with no obvious gaps that would cause agent failures in migration workflows.

    Maintenance

    ActivityActive
    ResponsivenessMixed handling

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables comprehensive Ansible automation management through natural language, including playbook creation and execution, inventory management, role scaffolding, and project workflows. Supports both local inventories and full project lifecycle management with syntax validation and idempotency testing.
      30
      -
    • F
      license
      C
      quality
      D
      maintenance
      Enables comprehensive management of Ansible Automation Platform Controller and Gateway through 17 specialized tools covering job execution, inventory management, workflows, credentials, user administration, and system monitoring.
      18
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      36 enterprise MCP tools for AWS security, infrastructure generation, AI workflows, and agent governance. IAM validation, MFA compliance, CloudFormation/SAM generation, DynamoDB design, OAuth validation, vector embeddings, error analysis, data lake readiness, 12 ACI governance tools for AI agent safety, and 4 local interview tools.
      58 npm
      MIT