Skip to main content

Ansible

@jamesakeech/ansiblev2026.07.30.1· 2d agoMODELS
01README

Drive an existing Ansible playbook from swamp. check runs --check --diff and never mutates, so changed=0 across every host is a machine-readable 'already matches its declaration' gate; apply runs for real. Parses the PLAY RECAP into typed per-host tallies for CEL, accepts inventory as content so a workflow can build it from model data instead of a render script, and keeps vault and sudo passwords in 0600 temp files rather than argv.

02Models1
@jamesakeech/ansiblev2026.07.30.1ansible.ts

Global Arguments

ArgumentTypeDescription
workdirstringDirectory ansible-playbook runs in — the checkout root, so ansible.cfg and relative role paths resolve.
playbookstringPlaybook path relative to workdir, e.g. ansible/site.yml.
inventoryPath?stringInventory path relative to workdir. Omit when supplying inventoryContent per run.
privateKeyPath?stringPath to an SSH private key already on the swamp host. Not itself a secret — a path. Use privateKey to supply the key material from a vault instead.
privateKey?stringSSH private key material (PEM). Written to a 0600 temp file for the run, so a serve host needs no key on disk. Takes precedence over privateKeyPath.
remoteUser?stringSSH user (ansible -u).
vaultPassword?stringAnsible Vault password. Written to a 0600 temp file for --vault-password-file, never passed in argv.
becomePassword?stringsudo password. Passed via a 0600 extra-vars file as ansible_become_password, never in argv.
ansibleBinstringPath to the ansible-playbook binary.
metadatarecord
fn check(limit?: string, tags: array, skipTags: array, extraVars: record, inventoryContent?: string, verbosity: number, timeoutSec: number)
Run the playbook with --check --diff. Never mutates; changed=0 on every host means compliant.
ArgumentTypeDescription
limit?stringRestrict the run to a host subset (ansible --limit).
tagsarrayOnly run these tags.
skipTagsarraySkip these tags.
extraVarsrecordExtra vars, passed via a temp file rather than argv.
inventoryContent?stringInline inventory (YAML or INI), written to a temp file. Lets a workflow build inventory from model data via CEL instead of a render script.
verbositynumberNumber of -v flags.
timeoutSecnumberKill the run after this many seconds.
fn apply(limit?: string, tags: array, skipTags: array, extraVars: record, inventoryContent?: string, verbosity: number, timeoutSec: number)
Run the playbook for real.
ArgumentTypeDescription
limit?stringRestrict the run to a host subset (ansible --limit).
tagsarrayOnly run these tags.
skipTagsarraySkip these tags.
extraVarsrecordExtra vars, passed via a temp file rather than argv.
inventoryContent?stringInline inventory (YAML or INI), written to a temp file. Lets a workflow build inventory from model data via CEL instead of a render script.
verbositynumberNumber of -v flags.
timeoutSecnumberKill the run after this many seconds.

Resources

run(30d)— Result of an ansible-playbook run, per host
03Stats
A
100 / 100
Downloads
1
Archive size
12.0 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
04Platforms
05Labels