ansible-clilisted
Install: claude install-skill abdullahkhawer/devops-skills
# Ansible CLI Skill
Use the inventory table and rules below when constructing all `ansible`/`ansible-playbook` commands.
## Configuration
Update the table below with your inventory file paths before using this skill:
| Environment | Inventory File | Vault Password File |
|---|---|---|
| Production | `<your-prod-inventory>` | `<your-prod-vault-pass-file>` |
| Staging / Non-Prod | `<your-nonprod-inventory>` | `<your-nonprod-vault-pass-file>` |
If the target environment is unclear, ask the user before running any command.
### Prerequisites (one-time setup by user)
If `ansible` is not installed or no inventory is configured, inform the user that setup is required and ask them to complete the following steps manually. Do not perform these steps yourself.
```bash
brew install ansible
ansible-inventory -i <inventory-file> --list
```
## Command Format
Always pass `-i <inventory-file>` explicitly — never rely on a default inventory:
```bash
ansible-playbook -i <inventory-file> <playbook.yml> [options]
```
### Examples
```bash
# Dry run against non-prod
ansible-playbook -i <your-nonprod-inventory> <playbook.yml> --check --diff
# List hosts targeted by a play
ansible-playbook -i <your-nonprod-inventory> <playbook.yml> --list-hosts
```
## Available Commands
### Read-only (safe, no confirmation needed)
| Command | Description |
|---|---|
| `ansible-inventory -i <inv> --list/--graph` | Show inventory structure |
| `ansible <group> -i <inv> -m ping` | Check host connectivit