Skip to main content
Alison Aquinas logoAlison's LLM Skills Marketplace

ansible

Included in skill bundleci-cdView on GitHub ↗

Files

SKILL.mdagentsreferences

Install

Install only this skill with npx skills
npx skills add alisonaquinas/llm-ci-dev --skill 'ansible' -g -y
Install the containing skill bundle
/plugin install ci-cd@llm-skills
Download ansible-skill.zip
This skill is bundled inside ci-cd. Use npx skills when you only want this skill, or install the bundle once to make every included skill available through the plugin marketplace flow. Browse the full skill bundle repository at github.com/alisonaquinas/llm-ci-dev.

Invoke

Invoke this skill after installation
/ci-cd:ansible

SKILL.md


name: ansible description: Automate configuration management and application deployment with Ansible. Use when tasks mention ansible-playbook, inventory files, Ansible roles, ad-hoc commands, ansible-galaxy, or agentless SSH automation.

Ansible

Intent Router

RequestReferenceLoad When
Install tool, SSH setup, ansible.cfgreferences/install-and-setup.mdUser needs to install Ansible or configure control node
Inventory files, group_vars, host_varsreferences/inventory-and-variables.mdUser needs inventory structure or variable precedence
Playbook authoring, roles, modulesreferences/playbook-patterns.mdUser needs play structure, task patterns, or common modules
CLI commands, vault, galaxyreferences/command-cookbook.mdUser needs ansible/ansible-playbook/ansible-vault/galaxy commands

Quick Start

# 1. Define your inventory
cat > inventory.ini <<'EOF'
[web]
web1.example.com
web2.example.com

[db]
db1.example.com
EOF

# 2. Test connectivity (ad-hoc ping)
ansible all -i inventory.ini -m ping

# 3. Run a playbook
ansible-playbook -i inventory.ini site.yml

# 4. Dry-run a playbook (check mode — no changes)
ansible-playbook -i inventory.ini site.yml --check --diff

Core Concepts

ConceptDescription
Control nodeMachine where Ansible runs (requires Python; no agent needed on targets)
Managed nodeTarget host reached via SSH (Linux) or WinRM (Windows)
InventoryList of managed nodes (INI, YAML, or dynamic script)
PlaybookYAML file defining ordered plays and tasks
RoleReusable directory structure (tasks, handlers, templates, vars)
ModuleIdempotent unit of work (copy, service, package, user, command…)
CollectionPackaged set of roles, modules, and plugins from Ansible Galaxy

Safety Guardrails

  • Always run with --check --diff first to preview changes without applying them.
  • Use --limit to target a subset of hosts before running against all inventory.
  • Avoid command and shell modules when an idempotent module exists.
  • Running as root (become: true) requires explicit approval — confirm privilege escalation scope.
  • Protect secrets with ansible-vault encrypt — never commit plaintext passwords.
# Install a role then dry-run the playbook to preview changes
ansible-galaxy role install geerlingguy.java
ansible-playbook -i inventory.ini site.yml --check --diff

Workflow

  1. Define or update inventory.
  2. Test connectivity: ansible all -m ping -i inventory.ini
  3. Write or update playbook.
  4. Dry-run: ansible-playbook site.yml -i inventory.ini --check --diff
  5. Run against a subset: ansible-playbook site.yml -i inventory.ini --limit web1.example.com
  6. Run against all: ansible-playbook site.yml -i inventory.ini

Related Skills

  • terraform — provision infrastructure; Ansible configures after provisioning
  • open-tofu — open-source Terraform fork; same provisioning + Ansible pattern
  • pulumi — IaC with code; Ansible handles post-provision configuration
  • ci-architecture — integrating Ansible into CI/CD pipelines

References

← Back to marketplace