Use the `untaped awx` command to operate Ansible Automation Platform (AAP) or AWX and to prove playbook changes with `awx test` suites. Use when the user mentions AAP, AWX, Tower, automation controller, job templates, workflow templates, surveys, launching, syncing or following jobs, job logs, inventories, projects, schedules, or testing a playbook, role or template change.
Resources
2Install
npx skillscat add alexisbeaulieu97/untaped/untaped-awx Install via the SkillsCat registry.
untaped AWX/AAP
untaped awx reads and changes AAP/AWX resources by name, launches and
follows jobs, and runs declarative test suites that check every job. Prefer
it to raw API calls: it resolves names, previews writes, redacts secrets and
pipes typed records.
This page is the map; the details ship next to it:
| File | Read it when |
|---|---|
| references/test-suites.md | writing a test suite: every field, header variables, Jinja, merge rules, !ref, workflow suites (approvals, expect.nodes), --source-ref |
| references/test-results.md | reading awx test run results and deciding what to fix |
| references/agent-profile.md | setting up the AWX user and untaped profile an agent runs as |
| references/resources.md | selecting, patching, editing, copying, renaming, deleting resources |
| references/specs.md | the YAML document format of export and apply: workflow node graphs, apply --source-ref |
| references/jobs.md | launching, syncing, waiting, following, cancelling, inspecting jobs |
| examples/ | starting points: smoke.yml, variants.yml, negative.yml, idempotent.yml, workflow.yml |
Setup
- Settings live under
profiles.<name>.awx:base_url,tokenortoken_command,api_prefix,default_organization,page_size,test_timeoutandtest_parallel. - AAP uses the default
api_prefix/api/controller/v2/; upstream AWX
usually needsuntaped config set awx.api_prefix /api/v2/. - Set the token with
untaped config set awx.token --prompt(or--stdin),
or pointawx.token_commandat an argv list that prints it (environment
fallbacks: references/agent-profile.md).
Never print or echo a token. untaped awx pingchecks the controller and the token, and reports the
authenticateduser. Run it first when the profile may be stale.
Commands
| Task | Command |
|---|---|
| Find resources | untaped awx job-templates list --filter name__icontains=deploy |
| Read one in full | untaped awx job-templates get Deploy --format yaml |
| Change a field | untaped awx job-templates patch Deploy --set verbosity=2 --dry-run |
| Export / apply YAML | untaped awx job-templates export Deploy --out deploy.yml, then untaped awx apply deploy.yml --dry-run |
| Launch and follow | untaped awx job-templates launch Deploy --host-pattern web --follow |
| Sync a project | untaped awx projects sync Playbooks --wait |
| Inspect a job | untaped awx jobs logs 101 --tail 50, untaped awx jobs events 101 |
| Where a template runs | untaped awx job-templates usage Deploy --recursive |
| Start a test suite | untaped awx test init Deploy |
| Check suites | untaped awx test validate |
| Run suites | untaped awx test run --scm-branch HEAD --format json |
| Suite format as JSON Schema | untaped awx schema AwxTestSuite |
Writable groups: job-templates, workflow-templates, projects,schedules, hosts, groups, inventories, inventory-sources.
Credentials, credential types, organizations and unified templates are
read-only views. Run untaped awx job-templates --help (or any group) to
confirm options before acting.
Test a change
Suites live in the playbook repository under .untaped/awx/tests/. After
changing a playbook, role or template variables:
- Without a suite yet,
untaped awx test init "Deploy app"(--workflow
for a workflow) writes a starter suite from the template's survey and
prompts; edit its cases, starting from the examples. - Once per task, save the base branch's results outside the checkout:
untaped awx test run --scm-branch main --format json > /tmp/baseline-PROJ-123.json
(exit 1 whenmainalready fails some cases is expected). - Commit and push the branch (
git push -u origin HEAD): AWX runs what the
remote has. untaped awx test validatechecks every case without launching: the file,
the template, its prompts and required survey variables. When the change
edits a spec under.untaped/awx/, pass--source-ref HEADhere and in
step 5 instead of--scm-branch HEAD.untaped awx test run --scm-branch HEAD --compare /tmp/baseline-PROJ-123.json --format json
runs every case on the pushed commit (refused until HEAD is pushed) and
gives each row achange. Narrow it with--case SUITE/CASEor paths.- Exit 0: no regression and no failing new case (
still_failingrows are
only reported); 4 or 5: the environment, not your change. Each failing
row'sfailure.systemsays who must act andfailure.evidencewhy
(references/test-results.md); fix, push,
rerun.
Run as the dedicated agent profile when one exists
(untaped --profile agent awx test run).
Output and pipes
- Read results with
--format json(oryaml); never parse tables. stdout
carries data only; previews, prompts, progress and errors go to stderr. --format pipeemits typed records that a--stdinconsumer of the same
kind reads directly:untaped awx job-templates launch Deploy --format pipe | untaped awx jobs wait --stdin.
Safety
patch,edit,apply,delete,copy,rename,jobs cancelandjobs relaunchpreview once and ask with No as the default. Run them with--dry-run, show the user the preview, then pass--yesonly once the user
approves. Without a terminal, a configuration write needs--yesor--dry-run(exit 2 otherwise).- A single named
launch/syncsubmits at once; several targets,--all,--filter,--searchor--stdinlist them and ask once. - Exit codes: 0 success, 1 failure or declined, 2 usage error, 3 drift
(apply --check), 4 fix the environment, 5 retry later, 130
interrupted.--format jsonmakes stderr JSON Lines, and failed rows
carry anerror(see references/resources.md). - Keep
$encrypted$placeholders as they are; they preserve stored secrets.
Pitfalls
- A name that exists in several organizations is ambiguous: pass
--organizationor setawx.default_organization. - AWX ignores a launch field whose
ask_*_on_launchis false; untaped refuses
it before launching, so enable the prompt on the template instead. --scm-branchneedsask_scm_branch_on_launch, which AWX allows only when
the project allows branch override.patchandeditnever create or rename; useapplyandrename.-falways means--format;--followhas no short form.