2023-11-08 16:05:11 +01:00
# renovate: datasource=pypi depName=ansible-core versioning=pep440
2023-11-08 17:51:13 +01:00
ARG ANSIBLE_VERSION = 2 .13.13
2023-11-08 16:05:11 +01:00
# renovate: datasource=pypi depName=ansible-lint versioning=pep440
2023-11-08 17:20:45 +01:00
ARG ANSIBLE_LINT_VERSION = 6 .22.0
2023-11-08 16:05:11 +01:00
# renovate: datasource=pypi depName=yamllint versioning=pep440
2023-11-09 13:28:07 +01:00
ARG YAMLLINT_VERSION = 1 .33.0
2023-11-08 17:20:45 +01:00
# alpine version
2023-12-08 23:02:50 +01:00
FROM alpine:3.19
2022-03-15 14:23:01 +01:00
# install software
RUN apk update
RUN apk add --no-cache \
build-base \
ca-certificates \
git \
libffi-dev \
openssh \
python3 \
python3-dev \
py3-pip
2022-04-13 13:38:00 +02:00
# cleanup
2022-03-15 14:23:01 +01:00
RUN rm -rf /var/cache/apk/*
2023-11-08 17:20:45 +01:00
# arguments
ARG ANSIBLE_VERSION
ARG ANSIBLE_LINT_VERSION
ARG YAMLLINT_VERSION
2022-03-15 14:23:01 +01:00
# install ansible + linters
2023-12-08 23:02:50 +01:00
RUN pip3 install --use-pep517 --ignore-installed --break-system-packages \
2023-02-02 08:38:10 +01:00
ansible-core= = ${ ANSIBLE_VERSION } \
ansible-lint= = ${ ANSIBLE_LINT_VERSION } \
2023-11-08 17:21:35 +01:00
yamllint = = ${ YAMLLINT_VERSION }
2022-05-27 11:58:16 +02:00
2023-12-24 14:07:09 +01:00
# download collections
2023-12-24 14:08:18 +01:00
RUN wget -O /tmp/ansible-posix.tar.gz https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-posix-1.5.4.tar.gz
2023-12-24 14:07:09 +01:00
2022-05-27 11:58:16 +02:00
# install ansible collections
2023-12-24 14:07:09 +01:00
RUN ansible-galaxy collection install /tmp/ansible-posix.tar.gz
2022-05-27 11:58:16 +02:00
RUN ansible-galaxy collection install community.docker
RUN ansible-galaxy collection install community.general
RUN ansible-galaxy collection install community.mysql