Reference for writing Terraform configuration with the JerryBalmer1/ansible provider - every resource, data source, ephemeral resource, action, list resource and function with a one-line summary and a link to its generated docs page. Use when writing or reviewing HCL that uses ansible_* types, or when deciding which type fits a task.
Install
npx skillscat add jerrybalmer1/terraform-provider-ansible/ansible-provider Install via the SkillsCat registry.
SKILL.md
When to use
When writing, reviewing or explaining Terraform configuration that uses this provider (source = "JerryBalmer1/ansible"), or when choosing between its types.
Rules that every configuration follows
- Terraform >= 1.16.0. Actions and list resources do not work on OpenTofu; resources, data sources and ephemeral resources do.
- Playbook runs are actions. They return only progress and diagnostics; read results on the next plan with
data "ansible_run". - Secrets reach runs only as ephemeral values (ephemeral resources or
ephemeral = truevariables), never as plain values: the saved plan file stores every plain action argument in clear text, and also any non-ephemeral value given to a write-only one (docs/experiments/02-writeonly-action.md). - Read the linked page before using a type; the page is the schema.
Resources
- `ansible_content`: Ansible project content (playbooks, roles, collections) materialised into a local directory from a local directory, a git repository, a Galaxy collection or a tarball.
- `ansible_execution_environment`: Renders an execution environment (EE) build context: the Containerfile and _build/ directory that ansible-builder create (3.2.0, definition version 3) would write, generated in Go so it works on Windows.
- `ansible_group`: An Ansible inventory group.
- `ansible_group_membership`: Adds hosts to a group from the group's side (ansible/terraform-provider-ansible#141), so a group module can own its member list without editing every ansible_host.
- `ansible_host`: An Ansible inventory host.
- `ansible_inventory`: Materialises hosts, groups, memberships and static inventory sources into one Ansible YAML inventory (rendered), the string ansible_playbook_run takes as inventory.
Data sources
- `ansible_controller_runtime`: Checks whether this controller can run playbooks on an execution target, without running anything.
- `ansible_inventory`: Reads a static Ansible inventory, from a file (source), inline text (content), or group blocks (the ansible/ansible v1.5.0 form), and exposes it as structured hosts and groups plus a json rendering.
- `ansible_requirements`: Normalises Ansible collection, role, Python, system (bindep) and PowerShell requirements into canonical files and a content hash.
- `ansible_run`: Reads back a past ansible_playbook_run from its artifacts on this controller: status, rc, per-host stats and host lists from the run lineage record (lineage.json, written by the provider's runner plugin).
Ephemeral resources
- `ansible_ssh_identity`: Loads an SSH private key in memory, decrypting it if needed, and returns it as an unencrypted OpenSSH key for a run's write-only ssh_private_key, plus its public half.
- `ansible_vault`: Decrypts an Ansible Vault file in memory.
- `ansible_vault_string`: Decrypts an inline Ansible Vault string in memory.
Actions (Terraform only)
- `ansible_playbook_run`: Runs an Ansible playbook with ansible-runner worker on an execution target.
List resources (Terraform only, terraform query)
None yet.
Functions
None yet.