Ansible
@jamesakeech/ansiblev2026.07.30.1
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.
02Models
@jamesakeech/ansiblev2026.07.30.1ansible.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| workdir | string | Directory ansible-playbook runs in — the checkout root, so ansible.cfg and relative role paths resolve. |
| playbook | string | Playbook path relative to workdir, e.g. ansible/site.yml. |
| inventoryPath? | string | Inventory path relative to workdir. Omit when supplying inventoryContent per run. |
| privateKeyPath? | string | Path 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? | string | SSH 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? | string | SSH user (ansible -u). |
| vaultPassword? | string | Ansible Vault password. Written to a 0600 temp file for --vault-password-file, never passed in argv. |
| becomePassword? | string | sudo password. Passed via a 0600 extra-vars file as ansible_become_password, never in argv. |
| ansibleBin | string | Path to the ansible-playbook binary. |
| metadata | record |
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.
| Argument | Type | Description |
|---|---|---|
| limit? | string | Restrict the run to a host subset (ansible --limit). |
| tags | array | Only run these tags. |
| skipTags | array | Skip these tags. |
| extraVars | record | Extra vars, passed via a temp file rather than argv. |
| inventoryContent? | string | Inline inventory (YAML or INI), written to a temp file. Lets a workflow build inventory from model data via CEL instead of a render script. |
| verbosity | number | Number of -v flags. |
| timeoutSec | number | Kill 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.
| Argument | Type | Description |
|---|---|---|
| limit? | string | Restrict the run to a host subset (ansible --limit). |
| tags | array | Only run these tags. |
| skipTags | array | Skip these tags. |
| extraVars | record | Extra vars, passed via a temp file rather than argv. |
| inventoryContent? | string | Inline inventory (YAML or INI), written to a temp file. Lets a workflow build inventory from model data via CEL instead of a render script. |
| verbosity | number | Number of -v flags. |
| timeoutSec | number | Kill 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