Skip to main content
Glama

SousChef: Миграция с различных платформ на Ansible + планирование обновлений Ansible

Преобразуйте автоматизацию Chef, SaltStack, Puppet, PowerShell и Bash в Ansible и планируйте обновления версий Ansible. Работает с любым ИИ-ассистентом через MCP (Model Context Protocol) — Claude, GPT-4, GitHub Copilot, Red Hat AI, локальными моделями и другими.

Краткие факты: Лицензия MIT | Python 3.10+ | 95 инструментов MCP | 91% покрытие тестами

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


Предупреждение Я не создавал вручную 100 тысяч строк кода за два дня, работая при этом на своей основной работе (которая, к слову, не связана с этим проектом). Большая часть кода сгенерирована ИИ. Да, я проектировал архитектуру, редактировал вручную и лично ругался на него, но влияние ИИ в этом репозитории повсюду.

Я добавил множество тестов и проверяю работоспособность перед публикацией, но некоторые вещи могут сломаться или быть сломанными изначально. Если что-то найдете — создайте тикет, и я исправлю.

Значительная часть проекта опирается на имитированные API Chef/AWX/AAP, потому что, как ни странно, у меня нет парка корпоративных инсталляций с корпоративными данными для тестирования. Покупатель, будь осторожен (вдвойне, так как вы ничего не покупали).


Что он делает

Миграция с Chef на Ansible — Преобразуйте кулинарные книги (cookbooks), рецепты, пользовательские ресурсы, data bags и планы Habitat в плейбуки, роли и контейнеры Ansible. Поддерживает инфраструктуру, приложения и операционные задачи (day-2 operations).

Миграция с SaltStack на Ansible — Преобразуйте состояния Salt, pillars и таргетинг top.sls в роли Ansible, файлы переменных, Ansible Vault и INI-инвентарь. Оценивайте сложность, создавайте поэтапные планы миграции и формируйте отчеты для руководства.

Миграция с Puppet на Ansible — Преобразуйте манифесты Puppet и каталоги модулей в плейбуки Ansible, используя идиоматические модули ansible.builtin. Распознает 14 типов ресурсов Puppet; сопоставляет 10 из них с модулями Ansible с помощью ИИ для преобразования сложных конструкций.

Миграция с PowerShell на Ansible — Преобразуйте скрипты подготовки Windows PowerShell в идиоматические плейбуки ansible.windows, роли, инвентари WinRM и шаблоны заданий AWX/AAP.

Миграция Bash-скриптов — Преобразуйте Bash-скрипты подготовки в плейбуки и роли Ansible с оценкой качества, обнаружением конфиденциальных данных и подсказками по готовности к AAP.

Планирование обновлений Ansible — Оценивайте совместимость, планируйте обновления версий, проверяйте коллекции, выявляйте критические изменения и создавайте стратегии тестирования.

Related MCP server: AAP MCP Server

Установка и настройка

# 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?"

Другие MCP-клиенты: См. config/CONFIGURATION.md для настройки VS Code Copilot, пользовательских конфигураций и развертывания в Docker.

Основные возможности

  • 95 инструментов MCP для миграции с Chef, SaltStack, Puppet, PowerShell, Bash и обновлений Ansible

  • Веб-интерфейс с интерактивным планировщиком миграции и визуализацией (включая вкладки Salt, Puppet, PowerShell и Bash)

  • CLI для автоматизации и интеграции в CI/CD

  • Готовность к продакшену с 91% покрытием тестами и комплексной проверкой

  • Агностичность к моделям — работает с любым ИИ-ассистентом, поддерживающим MCP

  • Загрузка данных с сервера Chef с учетом зависимостей и экспортом автономного пакета

Типичные сценарии использования

Миграция с Chef:

  • Преобразование кулинарных книг в плейбуки и роли Ansible

  • Миграция приложений Chef Habitat в Docker-контейнеры

  • Преобразование data bags в Ansible Vault

  • Генерация шаблонов заданий и рабочих процессов AWX/AAP

  • Преобразование тестов InSpec в задачи проверки Ansible

  • Получение кулинарных книг с сервера Chef с использованием run_list или выбора политик

Миграция с SaltStack:

  • Парсинг файлов состояний SLS и извлечение состояний, pillars и ссылок на grains

  • Преобразование состояний Salt в плейбуки Ansible и файлы задач ролей

  • Миграция данных pillar в group_vars/ и Ansible Vault

  • Генерация инвентаря Ansible из правил таргетинга top.sls

  • Пакетное преобразование полного дерева состояний Salt в структуру ролей Ansible

  • Оценка сложности миграции и создание поэтапных планов

Миграция с Puppet:

  • Преобразование манифестов Puppet (.pp) и каталогов модулей в плейбуки Ansible

  • Распознавание 14 типов ресурсов Puppet; сопоставление 10 с идиоматическими модулями ansible.builtin (package, service, file, user, group, exec, cron, host, mount, ssh_authorized_key)

  • Предупреждения о неподдерживаемых конструкциях (поиск Hiera, экспортированные ресурсы, create_resources) с рекомендациями по ручной проверке

  • ИИ-помощь при преобразовании сложного DSL Puppet, который невозможно сопоставить автоматически

  • Преобразование отдельных объявлений ресурсов Puppet в автономные задачи Ansible

Миграция с PowerShell:

  • Преобразование скриптов подготовки Windows PowerShell в идиоматические плейбуки Ansible

  • Генерация полноценных ролей Ansible с инвентарем WinRM и group_vars

  • Сопоставление 28+ шаблонов PowerShell с ansible.windows.*, community.windows.*, chocolatey.chocolatey.*

  • Генерация шаблонов заданий AWX/AAP для Windows с учетными данными WinRM

  • Анализ точности миграции (0–100%) с практическими рекомендациями

  • Создание полного файла requirements.yml для необходимых коллекций Windows

Миграция Bash-скриптов:

  • Преобразование Bash-скриптов подготовки в идиоматические плейбуки Ansible

  • Генерация полноценных ролей Ansible из Bash-скриптов (задачи, обработчики, значения по умолчанию, метаданные)

  • Обнаружение и маркировка жестко закодированных секретов с рекомендациями по использованию ansible-vault

  • Идентификация вызовов других систем управления конфигурациями (Salt, Puppet, Chef), встроенных в Bash

  • Получение подсказок по шаблонам заданий для AAP с рекомендациями по среде выполнения (Execution Environment)

  • Оценка качества миграции (A–F) с ранжированными предложениями по улучшению

Обновления Ansible:

  • Оценка совместимости версий Python и Ansible

  • Планирование обновлений с анализом критических изменений

  • Проверка совместимости коллекций

  • Генерация стратегий тестирования

  • Отслеживание дат окончания поддержки (EOL)

Инфраструктура и приложения:

  • Подготовка инфраструктуры и конфигурация

  • Автоматизация развертывания приложений

  • Операционные задачи (резервное копирование, масштабирование, обновления)

  • Миграция CI/CD конвейеров

  • Мультиоблачная автоматизация

Примеры командной строки

# 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

Документация

С чего начать

Справочник

Последние обновления

v7.0.0 — Документация по миграции с различных платформ (SaltStack, Bash, PowerShell и Puppet) первого класса

v6.0.0 — Фундамент ядра v2 с расширенными возможностями миграции

v5.1.4 — Модульная архитектура, 91% покрытие тестами, полная типизация, готовность к продакшену

v5.0.0 — Полное планирование обновлений Ansible с матрицами версий и отслеживанием EOL

Внесение вклада

# 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

Стандарты: Политика нулевых предупреждений, обязательные подсказки типов, покрытие тестами 90%+, австралийское написание английского языка.

См. CONTRIBUTING.md для получения полных инструкций.

Поддержка

Лицензия

Лицензия MIT — подробности см. в LICENSE.

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