write-script-ansible

Write Ansible playbooks as Windmill scripts with header-defined arguments and dependencies.

17.8k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-ansible
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-ansible
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-ansible
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-ansible

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing Ansible playbooks that run correctly on Windmill requires knowing the platform-specific header format, argument passing, and CLI workflow, which this Skill encodes so generated playbooks work on the first run.

Core Features & Use Cases

  • Playbook Authoring: Produces single-file Ansible scripts combining a Windmill header (extra_vars, inventory, files, dependencies, vault) with standard Ansible plays.
  • CLI Workflow Guidance: Selects the right command for each intent, using wmill script preview for local iteration, wmill generate-metadata to sync locks and input schemas, and deploy only on explicit request.
  • Use Case: Ask for a playbook that provisions hosts with a parameterized message and galaxy collections; the Skill writes the YAML with a correct header, then previews it locally with sample arguments.

Quick Start

Write an Ansible playbook 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 for Windmill?

Create a single YAML file with two parts separated by a --- line: a Windmill header defining extra_vars, inventory, and dependencies, followed by standard Ansible plays. Arguments declared in extra_vars are used as Jinja variables like {{ name }} in tasks.

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

Declare each argument under extra_vars in the header with a type such as string, number, or boolean. Windmill passes them via --extra-vars, making them available as Jinja variables inside the plays.

Should I use wmill script preview or wmill script run?

Use wmill script preview when iterating on local script edits, since it runs the local file without deploying. Use wmill script run only to execute the version already deployed in the workspace.

Can Ansible playbooks in Windmill install galaxy collections and pip packages?

Yes, the header's dependencies key supports galaxy collections and roles installed with ansible-galaxy, plus python pip packages available to the playbook at runtime.

How does an Ansible playbook return a result in Windmill?

Write JSON content to a file named result.json in the job directory, typically using the copy module with the to_json filter. Windmill reads that file as the script's return value.