Add Ansible Container (#390)
* Add Ansible Container * fix1 * Linting fixes * more linting * even more linting * MOARRRR * sh + nano * tweaking * hmm * TYPO's * no build deps
This commit is contained in:
parent
34ddfa1f1e
commit
5260be217b
|
@ -0,0 +1,70 @@
|
|||
# hadolint ignore=DL3007
|
||||
FROM ghcr.io/truecharts/alpine:latest
|
||||
|
||||
# Metadata params
|
||||
ARG TARGETPLATFORM
|
||||
ARG VERSION
|
||||
|
||||
# hadolint ignore=DL3002
|
||||
USER root
|
||||
|
||||
SHELL ["/bin/sh", "-o", "pipefail", "-c"]
|
||||
|
||||
|
||||
# hadolint ignore=DL3008,DL3013,DL3015,DL3017,DL3018,DL3019,SC2086,SC2155
|
||||
RUN \
|
||||
echo "==> Upgrading apk and system..." \
|
||||
&& apk --update --no-cache add \
|
||||
ca-certificates \
|
||||
git \
|
||||
openssh-client \
|
||||
openssl \
|
||||
python3\
|
||||
py3-pip \
|
||||
py3-cryptography \
|
||||
rsync \
|
||||
sshpass \
|
||||
&& echo "==> Adding build-dependencies..." \
|
||||
&& apk --update --no-cache add --virtual \
|
||||
.build-deps \
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
openssl-dev \
|
||||
build-base \
|
||||
curl \
|
||||
&& echo "==> Adding Python runtime..." \
|
||||
&& pip3 install --no-cache-dir --upgrade \
|
||||
pip \
|
||||
cffi \
|
||||
&& echo "==> Installing Ansible..." \
|
||||
&& pip3 install --no-cache-dir \
|
||||
ansible==${VERSION} \
|
||||
ansible-lint \
|
||||
&& apk del \
|
||||
.build-deps \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& echo "==> Cleaning up..." \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& echo "==> Adding hosts for convenience..." \
|
||||
&& mkdir -p /etc/ansible /ansible \
|
||||
&& echo "[local]" >> /etc/ansible/hosts \
|
||||
&& echo "localhost" >> /etc/ansible/hosts
|
||||
|
||||
|
||||
ENV ANSIBLE_GATHERING smart
|
||||
ENV ANSIBLE_HOST_KEY_CHECKING false
|
||||
ENV ANSIBLE_RETRY_FILES_ENABLED false
|
||||
ENV ANSIBLE_ROLES_PATH /ansible/playbooks/roles
|
||||
ENV ANSIBLE_SSH_PIPELINING True
|
||||
ENV PYTHONPATH /ansible/lib
|
||||
ENV PATH /ansible/bin:$PATH
|
||||
ENV ANSIBLE_LIBRARY /ansible/library
|
||||
|
||||
WORKDIR /ansible/playbooks
|
||||
|
||||
ENTRYPOINT ["ansible-playbook"]
|
||||
|
||||
LABEL "maintainer"="TrueCharts <info@truecharts.org>"
|
||||
LABEL "authors"="TrueCharts <info@truecharts.org>"
|
||||
LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps/tree/master/.containers/apps/bazarr"
|
||||
LABEL "org.opencontainers.image.documentation "="https://truecharts.org"
|
|
@ -0,0 +1 @@
|
|||
2.5.0
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
version=$(curl -sX GET https://pypi.org/pypi/ansible/json | jq --raw-output '.["releases"] | keys[]' | grep -v rc | grep -v a | grep -v b | tail -n1rep -v buildcache | tail -n1)
|
||||
version="${version#*v}"
|
||||
version="${version#*release-}"
|
||||
echo "${version}"
|
Loading…
Reference in New Issue