Python3 and Ansible environment to execute Playbooks without installing those tools in your system.
The docker image has also ssh client to act as a Control Node over a set of managed nodes.
The Dockerfile is based on Ubuntu:
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y gcc python3-dev
# Virtualenv path
ENV VIRTUAL_ENV=/root/.venv
RUN apt-get install python3-pip -y
RUN pip install --upgrade pip
RUN apt-get -y install openssh-client
RUN apt install python3-pip-whl
RUN apt install python3-setuptools-whl
# Install and create venv
RUN apt-get install python3.10-venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Install dependencies in venv
RUN pip install passlib
RUN pip install netaddr
RUN pip install pyyaml
RUN pip install ansible-lint
RUN pip install yamllint
RUN pip install ansible
RUN ssh-keygen -q -t rsa -b 4096 -N '' -f /root/.ssh/id_rsa
Content type
Image
Digest
sha256:61008888e…
Size
337.1 MB
Last updated
almost 3 years ago
docker pull vissol/ansible