Vous allez découvrir comment installer Ansible sur différents OS mais aussi en environnement Dockerized.
Testé sur Debian12, Ubuntu 2204
sudo apt install ansible
sudo zypper install ansible
Créer ce Dockerfile
FROM ubuntu
ENV ANSIBLE_VERSION 2.9.17
RUN apt-get update; \
apt-get install -y gcc python3; \
apt-get install -y python3-pip; \
apt-get clean all
RUN pip3 install --upgrade pip; \
pip3 install "ansible==${ANSIBLE_VERSION}"; \
pip3 install ansible
Buildez l'image
docker build -t myansible
Lancez votre conteneur
docker run -it ansible