$ account ansible
This repository is ansible-core, the foundational engine of the Ansible IT automation platform. In production, it executes declarative playbooks against remote targets via SSH, WinRM, or local connections, managing configuration, application deployment, and orchestration across heterogeneous systems (Linux, Windows, macOS, network devices). The architecture is plugin-based: a core runtime (playbook parser, task executor, variable and fact management) loads hundreds of plugins (actions, modules, inventory sources, cache backends, callbacks, filters, tests, lookups, connections, become methods, and more). Key entry points are CLI tools (`ansible`, `ansible-playbook`, `ansible-galaxy`, `ansible-test`) that parse arguments, load playbooks/inventories, and orchestrate task execution across a pool of worker processes. Primary data flows include playbook parsing → variable resolution (including Jinja2 templating with data tagging for provenance/trust) → inventory and host matching → fact gathering (via built-in collectors or external tools like Facter/Ohai) → task execution (module payloads are shipped via AnsiballZ, a self-extracting archive) → result collection and callback output. External dependencies include Jinja2, PyYAML, cryptography, and resolvelib; the codebase also vendors a copy of the `distro` library and includes a full test framework (`ansible-test`) with cloud integration and sanity checks.
Ansible Development Tools (ADT) is an installable Python package and CLI wrapper that bundles the official Ansible content-creation toolchain—ansible-builder, ansible-core, ansible-creator, ansible-dev-environment, ansible-lint, ansible-navigator, ansible-sign, molecule, pytest-ansible, and tox-ansible—behind a single `adt` command. The package's own Python code is deliberately small: `adt --version` enumerates versions of the bundled tools via importlib.metadata, and `adt server` starts an embedded Django WSGI application served by Gunicorn. The repository also contains build definitions for the `community-ansible-dev-tools` execution environment and an OpenShift Dev Spaces image, including podman-in-container support. The production behavior of the original code is a machine-facing REST API, not a user interface. Endpoints under `/v1/creator` and `/v2/creator` invoke ansible-creator's Python API to scaffold playbook, collection, devfile, and execution-environment projects and return them as tar archives. The server additionally exposes `/metadata`, `/v2/creator/capabilities`, `/v2/creator/schema`, and `/v2/creator/scaffold` for backend discovery and dynamic command execution. Every request and response is validated against a bundled OpenAPI 3.1 schema using openapi-core, with validation failures returned as HTTP 400 responses. Outside the Python package, the repo contains substantial container engineering: multi-architecture image builds with buildx, GHCR manifest publishing, rootless podman setup, and an entrypoint that dynamically allocates subuid/subgid ranges for OpenShift's random-UID model. CI is comprehensive, with tox-based linting, unit/integration/container tests, CodeQL, nightly devel image builds, and automated dependency updates. Minor blemishes exist—duplication between the v1/v2 creator handlers, a deprecated `MIDDLEWARE_CLASSES` Django setting, and docs that still mention Python 3.10 while the package requires 3.11+—but the codebase is current, well-tested, and actively maintained.