24 — AWX → Forail Importer

import_from_awx is a one-shot, idempotent management command that migrates configuration from an existing AWX (or AAP) installation into Forail via the source's REST API. It exists so teams can move to Forail without rebuilding organizations, inventories, credentials and templates by hand.

Usage

forail-manage import_from_awx \
    --url https://awx.example.com \
    --token "$AWX_TOKEN" \
    --dry-run
Option Description
--url Base URL of the source AWX install (required).
--token OAuth2 token for the source AWX API (preferred auth).
--username/--password Basic auth, if no token.
--insecure Skip source TLS certificate verification.
--dry-run Fetch and report what would change, then roll back without writing.
--resource <type> Limit to specific resource type(s); repeatable. Default: all.

Resource types (and import order): organizations, users, teams, credential_types, credentials, projects, inventories, groups, hosts, inventory_sources, job_templates, workflow_job_templates, workflow_nodes, notification_templates, schedules, roles.

What it imports

Idempotency

Re-running is safe. Objects are matched by natural key — name within organization (username for users) — and updated rather than duplicated. An awx_id → Forail object map is maintained during the run to resolve foreign keys (e.g. a job template's inventory and project).

The whole run executes inside a single transaction with the activity stream disabled (so the migration does not flood the audit log). --dry-run rolls the transaction back at the end.

⚠️ Secrets are not migrated

The AWX REST API never returns secret credential inputs — it replaces them with the literal $encrypted$. User passwords are likewise not exported. Therefore:

Plan to re-enter credential secrets in Forail after the import.

Not imported by design

Job/workflow run history and ephemeral execution state are intentionally out of scope — this command migrates configuration, not job results. Secret values (credential inputs, notification tokens) cannot be exported by AWX and must be re-entered, as described above.