Ansible on Slackware-current in 2025
These are my notes on how to install the latest (or at least, more recent)
Ansible on Slackware-current, as of
September 2025. The SlackBuilds for the
ansible and ansible-core packages still target Slackware-15.0 so a lot of
the python3 dependencies are now included in Slackware-current.
Choosing the versions
When using Ansible, you need to be mindful of 4 things:
- The version of python3 on the control node (the computer you are running Ansible on),
- The version of python3 on the managed node (the computer you are targetting with Ansible),
- The most recent version of ansible-core that supports both versions of python3 (on control and managed nodes), and
-
The ansible community version(s) that work with the version of
ansible-core.
The python3 version "support matrix" for ansible-core is
here
and the mapping of ansible community version to ansible-core version is
here.
At the time of writing, the latest version of ansible-core is 2.19.1 and
the corresponding version of ansible is 11.9.0. This version of
ansible-core requires python3 versions 3.11 to 3.13 on the control node and
3.8 to 3.13 on the managed node.
For my work, the managed nodes are running Rocky Linux 8 so I require support
for python3 3.6. This means the latest version of ansible-core I can run
on the control node (my PC) is 2.16 and the corresponding version of
ansible is 9.X. However, I can build both ansible-core 2.16 and 2.19
and ansible 9.X and 11.X on Slackware-current as both versions work with
Slackware’s python3 3.12 and I just swap the Ansible packages based on the
requirements of the managed nodes.
Building the packages
Using the Sbopkg queue generator (sqg) against the
Slackware-15.0 SlackBuild repository, we can get the old (15.0) dependency
list.
sqg -p ansible cat /var/lib/sbopkg/queues/ansible.sqf
Of the 20 packages in the queue, 5 are required at run-time (shown in bold
below), 3 are required at build-time for the cryptography package (shown in
green), and 12 are now included in Slackware-current or don’t appear
to be required (shown in grey).
- python3-flit_core (included)
- python3-installer (included)
- python3-wheel (included)
- python3-pyproject-hooks (included)
- python3-build (included)
- python3-packaging-opt (included)
- python3-setuptools-opt (included)
- python-zipp (included)
- python-importlib_metadata (included)
- python3-resolvelib
- python3-toml (included via python-tomli-w)
- importlib-resources
- rust-opt (included)
- python3-semantic-version (build-time only)
- python3-typing-extensions (not required?)
- python3-setuptools-rust-opt (build-time only)
- python3-maturin (build-time only)
- cryptography
- ansible-core
- ansible
At the time of writing, the SlackBuild for ansible-core is for version
2.15.12 which uses setup.py for building and installing. This
installation method still works with version 2.16.X but was removed from
ansible-core in August 2023 and the pyproject.xml method is used instead.
To make the SlackBuild work with the latest 2.19.1 version (September 2025),
edit the ansible-core.SlackBuild to replace the setup.py line with calls
to the python-build and python-installer tools.
#python3 setup.py install --root=$PKG python3 -m build --wheel --no-isolation python3 -m installer -d "$PKG" dist/*.whl
Note that ansible-core builds fine without the importlib-resources and
python3-resolvelib dependencies but at least the latter is required for
ansible-galaxy to work. As python3-typing-extensions is listed as a
dependency of python3-setuptools-rust-opt, which builds fine without it and
is a build-time only requirement itself, I assume it is safe to leave it out.