domd

Ansible Integration

DoMD provides comprehensive support for testing and validating Ansible projects. This includes detection and testing of playbooks, roles, inventories, and other Ansible components.

Supported Ansible Features

Playbooks

Roles

Inventories

Ansible Vault

Ansible Galaxy

Recent Improvements

Enhanced Testing Framework

Command Detection

Performance Optimizations

Example Commands

# Run all Ansible tests
make test-ansible

# Test playbooks specifically
make test-playbooks

# Test role functionality
make test-roles

# Test Galaxy integration
make test-galaxy

# Test Vault functionality
make test-vault

# Test inventory handling
make test-inventory

Configuration

Ansible testing can be configured using the following environment variables:

Best Practices

  1. Organize your tests: Keep your test files organized by functionality
  2. Use fixtures: Leverage the provided test fixtures for common Ansible structures
  3. Mock external calls: Use mocking for external dependencies in unit tests
  4. Test different scenarios: Include tests for error cases and edge conditions
  5. Keep tests fast: Use appropriate test scopes and mocks to keep tests fast