Skip to content

Build Your Own Bundle ​

Most users do not need to build: prebuilt bundles already cover 4 OSes x 2 architectures (see the Platform Matrix), so just download one. Build your own only when:

  • you want a different Ansible version;
  • you want to change the set of bundled collections.

Build steps ​

  1. Prepare a build machine that meets all of these:

    • It can reach the internet
    • Its OS family, CPU architecture and Python version are the same as the offline target
  2. Clone the primary repository and run the builder:

bash
bash scripts/make-offline-bundle.sh
  1. The result lands in dist/: ansible-offline-install-2.0.0-bundle.tar.gz plus its .sha256 checksum file. Copy it to the offline machine and follow steps 2 and 3 of the Quick Start.

🌏 The builder prints Chinese by default; --lang en or the ANSIBLE_OFFLINE_LANG=en environment variable switches it to English.

Options (environment variables) ​

VariableEffect
WITH_COLLECTIONS=0Bundle Ansible only, without collections (smaller)
PYTHON_BIN=python3.11Pick which Python builds the bundle (when several are installed). Without it, the script auto-detects the first interpreter >= 3.11 among python3.13 / 3.12 / 3.11
PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simpleUse a domestic PyPI mirror when overseas networks are unreachable (Tsinghua shown; Aliyun works too)

Separately: to change the Ansible version, edit the ansible-core pin in requirements.txt before building.

Bundled collections ​

  • Bundles downloaded from Releases already contain ansible.posix and community.general (including their dependencies); install.sh installs them automatically, nothing extra to do.
  • collections-requirements.yml lists them; edit it and rebuild to change the set.
  • To skip collections at install time: INSTALL_COLLECTIONS=0 bash install.sh.

Note: where collections come from

Collections are downloaded from Ansible Galaxy overseas and have no stable domestic mirror. If the build machine cannot reach Galaxy, this step fails - in that case use a ready-made bundle from Releases instead; the bundles already include the collections.

Releaseansible-core 2.18.19Python >= 3.118 offline bundlesLicense MIT

A speck of dust from an era becomes a mountain when it lands on one person