From 8b76a14c73b69a755c9e6bf72bc199646c9bd834 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Sun, 30 May 2021 13:11:44 +0200 Subject: [PATCH] remove ansible container for now --- containers/apps/ansible/Dockerfile | 73 ----------------------- containers/apps/ansible/VERSION | 0 containers/apps/ansible/entrypoint.sh | 59 ------------------ containers/apps/ansible/latest-version.sh | 6 -- 4 files changed, 138 deletions(-) delete mode 100644 containers/apps/ansible/Dockerfile delete mode 100644 containers/apps/ansible/VERSION delete mode 100644 containers/apps/ansible/entrypoint.sh delete mode 100644 containers/apps/ansible/latest-version.sh diff --git a/containers/apps/ansible/Dockerfile b/containers/apps/ansible/Dockerfile deleted file mode 100644 index 45def6119c4..00000000000 --- a/containers/apps/ansible/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# 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 \ - && echo "==> install taskfile.dev..." \ - && sh -c "$(curl --location https://taskfile.dev/install.sh)" \ - && echo "==> Cleaning up..." \ - && apk del \ - .build-deps \ - && 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 - -COPY ./.containers/apps/ansible/entrypoint.sh /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] - -LABEL "maintainer"="TrueCharts " -LABEL "authors"="TrueCharts " -LABEL "org.opencontainers.image.source"="https://github.com/truecharts/apps/tree/master/.containers/apps/bazarr" -LABEL "org.opencontainers.image.documentation "="https://truecharts.org" diff --git a/containers/apps/ansible/VERSION b/containers/apps/ansible/VERSION deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/containers/apps/ansible/entrypoint.sh b/containers/apps/ansible/entrypoint.sh deleted file mode 100644 index e55d06e280e..00000000000 --- a/containers/apps/ansible/entrypoint.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# -# Simple wrapper for executing ansible-galaxy and ansible-playbook. -# -# USAGE: -# ansible-playbook-wrapper [other ansible-playbook arguments] -# -# ENVIRONMENT VARIABLES: -# -# - PIP_REQUIREMENTS: pip requirements filename; -# default = "requirements.txt" -# - ANSIBLE_REQUIREMENTS: ansible requirements filename; -# default = "requirements.yml" -# - DEPLOY_KEY deploy key (private) - -# Rotate ansible log if exist -if [ -f "ansible.log" ]; then - DATE_LOG=$(date -d "$(head -1 ansible.log | cut -d, -f1 )" +%Y%m%d-%H%M%S) 2>/dev/null - if [ -n "$DATE_LOG" ]; then - mv ansible.log ansible-${DATE_LOG}.log - gzip ansible-${DATE_LOG}.log & - fi -fi - -# Optional deploy key -if [ ! -z "$DEPLOY_KEY" ] && [ ! -f "/root/.ssh/id_rsa" ]; then - mkdir -p /root/.ssh/ - echo "${DEPLOY_KEY}" > /root/.ssh/id_rsa - chmod 0600 /root/.ssh/id_rsa -fi - -# Loadkey into ssh-agent if key exist -if [ -f "/root/.ssh/id_rsa" ]; then - eval $(ssh-agent) - ssh-add /root/.ssh/id_rsa -fi - -# install pip requirements, if any -if [ -z "$PIP_REQUIREMENTS" ]; then - PIP_REQUIREMENTS=requirements.txt -fi - -if [ -f "$PIP_REQUIREMENTS" ]; then - pip3 install --upgrade -r $PIP_REQUIREMENTS -fi - - -# install Galaxy roles, if any -if [ -z "$ANSIBLE_REQUIREMENTS" ]; then - ANSIBLE_REQUIREMENTS=requirements.yml -fi - -if [ -f "$ANSIBLE_REQUIREMENTS" ]; then - ansible-galaxy install $ANSIBLE_GALAXY_PARAM -r $ANSIBLE_REQUIREMENTS -fi - -cd /ansible - -exec "$@" diff --git a/containers/apps/ansible/latest-version.sh b/containers/apps/ansible/latest-version.sh deleted file mode 100644 index 3016f9bc3eb..00000000000 --- a/containers/apps/ansible/latest-version.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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}"