-
Notifications
You must be signed in to change notification settings - Fork 56
Building Ansible
Below versions of Ansible are available in respective distributions at the time of creation of these build instructions:
- RHEL 8.10 has
9.2.0 - RHEL (9.4, 9.6) have
7.7.0 - SLES (15 SP6, 15 SP7) have
9.4.0 - Ubuntu 22.04 has
2.10.8 - Ubuntu 24.04 has
9.2.0 - Ubuntu 25.04 has
11.2.0
The instructions provided below specify the steps to build Ansible version 12.1.0 on Linux on IBM Z for the following distributions:
- RHEL (8.10, 9.4, 9.6, 10.0)
- SLES (15 SP6, 15 SP7)
- Ubuntu (22.04, 24.04, 25.04)
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory
/<source_root>/will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
Note: Ansible(v12.1.0) was verified at the time of creation of these instructions
-
RHEL (8.10, 9.4, 9.6, 10.0)
sudo yum install -y python3.12-devel python3.12-pip gcc openssl-devel wget
-
SLES 15 SP6
sudo zypper install -y python312-devel python312-pip gcc openssl-devel wget
-
SLES 15 SP7
sudo zypper install -y python313-devel python313-pip gcc openssl-devel wget
-
Ubuntu 22.04
sudo apt update sudo apt install -y wget
-
Ubuntu (24.04, 25.04)
sudo apt-get update sudo apt install -y curl wget python3 python3-pip pipx pkg-config openssl libssl-dev
-
Install Python version
3.xon Ubuntu 22.04- Instructions for building Python 3.x can be found here
-
Install Rust on Ubuntu (24.x and 25.x)
cd $SOURCE_ROOT curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh /dev/stdin -y export PATH="$HOME/.cargo/bin:$PATH"
pip3 install cryptography==3.3.2 # For all distros except RHEL distros and Ubuntu (24.x and 25.x)
python3.12 -m pip install cryptography==3.3.2 # For RHEL 8.x and 9.x distros
python3.12 -m pip install cryptography # For RHEL 10.x
pip3 install ansible==12.1.0 # For all distros except RHEL distros and Ubuntu (24.x and 25.x)
python3.12 -m pip install ansible==12.1.0 --use-pep517 # For RHEL distros
pipx install --include-deps ansible==12.1.0 # For Ubuntu (24.x and 25.x)
pipx ensurepath # For Ubuntu (24.x and 25.x)
source ~/.bashrc # For Ubuntu (24.x and 25.x)Note: In case of an error sudo: pip3: command not found on RHEL or SLES, run above command as sudo -H env PATH=$PATH pip3 install ... instead of sudo pip3 install ....
Follow the official guide given here to verify the installation.
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.