write-script-ansible

Writes Ansible playbooks as Windmill scripts with header configuration and CLI workflow guidance.

1|Updated Aug 3, 2026
One-click install
npx skills add https://github.com/vpzed-dev/smithy --skill write-script-ansible-vpzed-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: write-script-ansible
Source: https://github.com/vpzed-dev/smithy/tree/main/windmill/local-dev/.agents/skills/write-script-ansible
Command: npx skills add https://github.com/vpzed-dev/smithy --skill write-script-ansible-vpzed-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Ansible playbooks that run inside Windmill requires a specific two-part script format and correct use of the wmill CLI, and mistakes like deploying untested changes or leaving lock files stale cause spurious diffs and broken runs. ## Core Features & Use Cases - Windmill Ansible script format: Structures a script as a YAML document with a Windmill header (extra_vars, inventory, files, dependencies, vault_password) followed by standard Ansible plays. - CLI workflow guidance: Distinguishes wmill script preview for local iteration from wmill script run for deployed versions, and prevents accidental deploys via sync push. - Metadata synchronization: Keeps .lock, .script.yaml, and wmill-lock.yaml hashes in sync after edits using wmill generate-metadata, including dry-run and rehash modes. - Use Case: A user asks to write a playbook that installs packages on inventory hosts; the Skill produces the header-plus-plays YAML, then runs wmill script preview with sample args and regenerates metadata before any deploy. ## Quick Start Write a Windmill Ansible script that prints a greeting using an extra_vars argument and preview it locally with wmill.

Frequently Asked Questions about write-script-ansible

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write an Ansible playbook that runs in Windmill?▼

Create a single YAML document with two parts separated by a `---` line: a Windmill header defining extra_vars, inventory, and dependencies, followed by standard Ansible plays. Windmill parses the header to build inputs and runs the plays with ansible-playbook.

How do I pass arguments to an Ansible playbook in Windmill?▼

Define arguments under `extra_vars` in the script header with a type such as string, number, or boolean. Windmill passes them via `--extra-vars`, making each one available as a Jinja variable like `{{ name }}` inside the plays.

What is the difference between wmill script preview and script run?▼

`wmill script preview` executes the local script file without deploying, so it is the default when iterating on edits. `wmill script run` executes the version already deployed in the workspace and should only be used when testing the deployed version.

Why does wmill-lock.yaml show diffs after editing a script?▼

Editing script content, especially adding imports or changing main's arguments, invalidates the stored content hash and leaves the lock and input schema stale. Run `wmill generate-metadata` to regenerate locks, schemas, and hashes so git-sync and CI stay clean.

Can a Windmill Ansible script return a result?▼

Yes. Write JSON to a file named `result.json` in the job directory, for example using the Ansible copy module with content rendered through the `to_json` filter. Windmill reads that file as the script's return value.