# Ansible Configuration

Configure how Atmos executes Ansible commands for configuration management and infrastructure automation, including playbook execution and inventory management.

## Configuration

**File:** `atmos.yaml`

```yaml
components:
  ansible:
    # Executable to run
    command: ansible

    # Base path to Ansible components
    base_path: components/ansible
```

## Configuration Reference

- **`command`**

  Specifies the executable to run for Ansible commands. Defaults to `ansible`.

  Examples:
  - `ansible` - Use Ansible from PATH
  - `/usr/local/bin/ansible` - Use specific binary
  - `/opt/venv/bin/ansible` - Use virtualenv binary
- **`base_path`**

  Directory containing Ansible component directories. Supports absolute and relative paths.

  Each subdirectory should contain Ansible playbooks and related files (roles, inventory, etc.).

## Component Directory Structure

Ansible components follow the same directory structure as other component types:

```
components/
└── ansible/
    ├── hello-world/
    │   ├── site.yml
    │   └── inventory.ini
    └── webserver/
        ├── site.yml
        ├── roles/
        └── inventory/
```

## Usage

With this configuration, you can run Ansible commands through Atmos:

```bash
# Run a playbook
atmos ansible playbook hello-world -s dev

# Check Ansible version
atmos ansible version
```

## Related Commands

## Related

- [Component Configuration Overview](/cli/configuration/components)
- [Ansible Components](/stacks/components/ansible)
- [Stack Configuration](/cli/configuration/stacks)
