From 0d31368132a4ed82899cbf02b57c62babf51a2ec Mon Sep 17 00:00:00 2001 From: Saibotk Date: Mon, 20 Jan 2025 00:21:51 +0100 Subject: [PATCH] remove!(camo): unused --- playbooks/camo.yml | 25 ---------- roles/camo/README.md | 35 -------------- roles/camo/defaults/main.yml | 42 ----------------- roles/camo/meta/main.yml | 44 ------------------ roles/camo/tasks/main.yml | 54 --------------------- roles/camo/templates/docker-compose.yml | 62 ------------------------- 6 files changed, 262 deletions(-) delete mode 100644 playbooks/camo.yml delete mode 100644 roles/camo/README.md delete mode 100644 roles/camo/defaults/main.yml delete mode 100644 roles/camo/meta/main.yml delete mode 100644 roles/camo/tasks/main.yml delete mode 100644 roles/camo/templates/docker-compose.yml diff --git a/playbooks/camo.yml b/playbooks/camo.yml deleted file mode 100644 index ef4aa1a..0000000 --- a/playbooks/camo.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern -# Copyright (C) 2020 Saibotk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -- name: Install & configure camo - hosts: camo - roles: - - docker - - docker_cleanup - - traefik - - camo diff --git a/roles/camo/README.md b/roles/camo/README.md deleted file mode 100644 index 29cfb20..0000000 --- a/roles/camo/README.md +++ /dev/null @@ -1,35 +0,0 @@ -Camo -========= - -This will setup a [go-camo](https://github.com/cactus/go-camo) content proxy server with their official docker container and traefik. - -Requirements ------------- - -You will need to have docker, docker-compose and traefik installed or declared as dependencies with their respective roles. - -**This role assumes that you have setup traefik with an endpoint called `websecure`.** - -Role Variables --------------- - -**Please look at the [defaults/main.yml](defaults/main.yml) for all available variables and their description.** - -**Note: Lines that are commented out via `#` are usually still valid/used variables, but they are not defined by default, so they might enable a feature, when uncommenting/defining them!** - -### Global variables, that are used: - -- `proxy_network`: Defined by the local traefik installation, this is the shared proxy network used by traefik to reach the containers. (optional) -- `proxy_hiddenservice`: Defined by the local traefik installation, this is used to generate the alt-svc header for the alternative Tor domain. (optional) - -Dependencies ------------- - -- docker -- docker-compose -- traefik - -License -------- - -GPL-3.0-only diff --git a/roles/camo/defaults/main.yml b/roles/camo/defaults/main.yml deleted file mode 100644 index 8af628e..0000000 --- a/roles/camo/defaults/main.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Default variables for the camo role - -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern -# Copyright (C) 2020 Saibotk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# The install location (where the docker-compose file is stored) -camo_install_location: "/srv/camo" - -# The camo version that should be used -# renovate: depName=docker.io/cactus4docker/go-camo -camo_version: "2.6.0" - -# The domain under which camo should be available using traefik -camo_domain: camo.example.com - -# The certresolver that is used by traefik for camo's domain -camo_traefik_certresolver: "letsencrypt_http" - -# The HMAC key to be used -camo_key: "{{ lookup('passwordstore', camo_domain + '/hmac-key create=true length=128') }}" - -# The maximum allowed response size (in KB). (0 means unlimited) -camo_max_size: 0 - -# Docker image and version -camo_image: "docker.io/cactus4docker/go-camo" -camo_image_version: "v{{ camo_version }}" diff --git a/roles/camo/meta/main.yml b/roles/camo/meta/main.yml deleted file mode 100644 index 8b2296a..0000000 --- a/roles/camo/meta/main.yml +++ /dev/null @@ -1,44 +0,0 @@ -galaxy_info: - author: saibotk - description: "Installs a go-camo image proxy server via Docker." - license: GPL-3.0-only - min_ansible_version: "2.9" - standalone: true - - platforms: - - name: EL - versions: - - all - - name: GenericUNIX - versions: - - all - - name: Fedora - versions: - - all - - name: opensuse - versions: - - all - - name: GenericBSD - versions: - - all - - name: FreeBSD - versions: - - all - - name: Ubuntu - versions: - - all - - name: SLES - versions: - - all - - name: GenericLinux - versions: - - all - - name: Debian - versions: - - all - - galaxy_tags: [] - -dependencies: - - role: docker - - role: traefik diff --git a/roles/camo/tasks/main.yml b/roles/camo/tasks/main.yml deleted file mode 100644 index 9fec7b5..0000000 --- a/roles/camo/tasks/main.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -# Tasks file for the camo role - -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -- name: Create install directory - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: "0700" - owner: "root" - group: "root" - with_items: - - "{{ camo_install_location }}" - become: true - tags: - - camo - -- name: Deploy docker-compose.yml - ansible.builtin.template: - src: docker-compose.yml - dest: "{{ camo_install_location }}/docker-compose.yml" - mode: "0600" - owner: "root" - group: "root" - validate: docker compose -f %s config -q - tags: - - docker - - camo - become: true - -- name: Compose camo container - community.docker.docker_compose_v2: - state: present - project_src: "{{ camo_install_location }}" - pull: always - remove_orphans: true - tags: - - camo - become: true diff --git a/roles/camo/templates/docker-compose.yml b/roles/camo/templates/docker-compose.yml deleted file mode 100644 index 8ec87da..0000000 --- a/roles/camo/templates/docker-compose.yml +++ /dev/null @@ -1,62 +0,0 @@ -{{ ansible_managed | comment }} - -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern -# Copyright (C) 2020 Saibotk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -version: '2' -services: - camo: - image: "{{ camo_image }}:{{ camo_image_version }}" - mem_limit: 64mb - memswap_limit: 128mb - security_opt: - - no-new-privileges - environment: - - "GOCAMO_HMAC={{ camo_key }}" - labels: - - "traefik.enable=true" - - - "traefik.http.routers.camo.rule=Host(`{{ camo_domain }}`) && PathPrefix(`/`)" - - "traefik.http.routers.camo.entrypoints=websecure" - - "traefik.http.routers.camo.tls=true" - - "traefik.http.routers.camo.tls.certresolver={{ camo_traefik_certresolver }}" - - "traefik.http.routers.camo.middlewares=camo,compress" - - "traefik.http.middlewares.camo.headers.sslredirect=true" - - "traefik.http.middlewares.camo.headers.stsSeconds=63072000" - - "traefik.http.middlewares.camo.headers.referrerPolicy=no-referrer" - -{% if proxy_network is defined %} - - "traefik.docker.network={{ proxy_network }}" -{% endif %} -{% if proxy_hiddenservice is defined and proxy_hiddenservice.content is defined %} - - "traefik.http.middlewares.camo.headers.customresponseheaders.alt-svc=h2={{ proxy_hiddenservice['content'] | b64decode | trim }}:443; ma=2592000" -{% endif %} - - command: - - "--max-size={{ camo_max_size }}" - - "--server-name='go-camo v{{ camo_version }}'" - restart: always -{% if proxy_network is defined %} - networks: - {{ proxy_network }}: -{% endif %} - -{% if proxy_network is defined %} -networks: - {{ proxy_network }}: - external: true -{% endif %}