31 lines
914 B
Docker
31 lines
914 B
Docker
FROM debian:trixie-slim
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ENV TZ=Europe/Berlin
|
|
ENV ANSIBLE_MAJOR_VERSION=2.20
|
|
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
|
|
|
RUN apt update && apt install -y --no-install-recommends \
|
|
nano \
|
|
git \
|
|
wget \
|
|
unzip \
|
|
curl \
|
|
python3-pip \
|
|
tzdata \
|
|
openssh-client \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN mkdir -p /etc/ssh/ssh_config.d \
|
|
&& printf 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n' > /etc/ssh/ssh_config.d/99-no-hostkey-check.conf
|
|
|
|
RUN pip3 install --no-cache-dir --upgrade \
|
|
ansible-core~=${ANSIBLE_MAJOR_VERSION}
|
|
|
|
RUN mkdir -p /root/.bashrc.d
|
|
COPY ansible-functs.sh /root/.bashrc.d/ansible-functs.sh
|
|
RUN chmod +x /root/.bashrc.d/ansible-functs.sh \
|
|
&& printf '\n[ -f /root/.bashrc.d/ansible-functs.sh ] && . /root/.bashrc.d/ansible-functs.sh\n' >> /root/.bashrc
|
|
|
|
WORKDIR /ansible
|
|
|
|
CMD ["ansible-playbook", "--version"] |