!chore(docker-compose): Remove deprecated docker-compose python library

Since docker_compose_v2 module is now finally available using the newer plugin, we can retire the hacky install of the docker compose python library.
This commit is contained in:
saibotk 2024-02-22 01:29:19 +01:00
parent 70341479b1
commit 7469b6bbf4
Signed by: saibotk
GPG key ID: 67585F0065E261D5
58 changed files with 0 additions and 346 deletions

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: camo
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- camo

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: codimd
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- codimd

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: docker_ipv6_nat
roles:
- docker
- docker_compose
- docker_cleanup
- docker_ipv6_nat
environment:

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: factorio
roles:
- docker
- docker_compose
- docker_cleanup
- factorio
environment:

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: gitlab
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- gitlab

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: gitlab_runner
roles:
- docker
- docker_compose
- docker_cleanup
- gitlab_runner
environment:

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: keycloak
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- keycloak

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: mailcow
roles:
- docker
- docker_compose
environment:
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
tasks:

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: mastodon
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- mastodon

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: matrix
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- matrix

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2021 Saibotk
@ -20,7 +19,6 @@
hosts: matrix_delegate
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- matrix_delegate

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2021 Saibotk
@ -20,7 +19,6 @@
hosts: matrix_elementweb
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- matrix_elementweb

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2021 Saibotk
@ -20,7 +19,6 @@
hosts: matrix_maubot
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- matrix_maubot

View file

@ -19,7 +19,6 @@
hosts: matrix_sliding_sync
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- matrix_sliding_sync

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2021 Saibotk
@ -20,7 +19,6 @@
hosts: matrix_webhooks
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- matrix_webhooks

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: minecraft
roles:
- docker
- docker_compose
- docker_cleanup
- minecraft
environment:

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: minecraft
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- minecraft_blockmap

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: minio
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- minio

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -21,7 +20,6 @@
hosts: monitoring
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- monitoring
@ -33,7 +31,6 @@
serial: 1
roles:
- docker
- docker_compose
- docker_cleanup
- telegraf
environment:

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: owncast
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- owncast

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2021 Saibotk
@ -20,7 +19,6 @@
hosts: penpot
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- penpot

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -23,5 +22,4 @@
- role: ssh
- role: devsec.hardening.ssh_hardening
become: true
- role: epel
- role: fail2ban

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
@ -22,7 +21,6 @@
serial: 1
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- static_websites

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2020 Saibotk
@ -20,7 +19,6 @@
hosts: teamspeak
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- teamspeak

View file

@ -1,5 +1,4 @@
---
# Infrastructure
# Ansible instructions to deploy the infrastructure
# Copyright (C) 2021 Saibotk
@ -20,7 +19,6 @@
hosts: vikunja
roles:
- docker
- docker_compose
- docker_cleanup
- traefik
- vikunja

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -1,27 +0,0 @@
docker_compose
=========
This will install the [docker-compose](https://docs.docker.com/compose/) python library via pip and by default choose another install location,
to prevent breaking system-wide pip packages.
Requirements
------------
You will need to have the EPEL repository enabled (eg. by installing the `epel-release` package), if you want to install `docker-compose` via yum.
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!**
Dependencies
------------
- epel (optional/situational)
License
-------
GPL-3.0-only

View file

@ -1,42 +0,0 @@
---
# Default variables for the docker_compose role
# Infrastructure
# Ansible instructions to deploy the infrastructure
# 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 <http://www.gnu.org/licenses/>.
# Control if the docker-compose package should be removed (default)
docker_compose_package: "docker-compose"
docker_compose_package_state: "absent"
# Should a docker-compose wrapper script be deployed?
# This will ensure, that you can still use the `docker-compose` command as usual.
docker_compose_install_wrapper: true
docker_compose_wrapper_path: /usr/local/bin/docker-compose
# Should docker-compose be installed via pip to another target?
# This is used to prevent docker-compose from corrupting other system-wide installed pip packages and thus
# the package will be installed standalone in another directory as defined below.
docker_compose_python_package_install: true
docker_compose_python_package_path: /opt/ansible-dependencies
# The package states of needed packages to install for the python libraries
docker_compose_python_pip_package_state: "present"
docker_compose_python_virtualenv_package_state: "present"
# The pip package name of for `docker-compose`
docker_compose_pip_package: "docker-compose"
docker_compose_pip_package_state: "present"
docker_compose_pip_package_version: "1.24.1"

View file

@ -1,21 +0,0 @@
galaxy_info:
author: saibotk
description: "Installs the docker-compose pip package."
license: GPL-3.0-only
min_ansible_version: "2.9"
standalone: true
platforms:
- name: EL
versions:
- "7"
- name: Ubuntu
versions:
- all
- name: Debian
versions:
- all
galaxy_tags: []
dependencies: []

View file

@ -1,32 +0,0 @@
---
# Tasks file for the docker_compose role
# Infrastructure
# Ansible instructions to deploy the infrastructure
#
# 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 <http://www.gnu.org/licenses/>.
- name: Ensure pip & virtualenv are installed.
ansible.builtin.package:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop:
- name: "python3-pip"
state: "{{ docker_compose_python_pip_package_state }}"
- name: "python3-virtualenv"
state: "{{ docker_compose_python_virtualenv_package_state }}"
when:
- docker_compose_python_package_install
become: true

View file

@ -1,32 +0,0 @@
---
# Tasks file for the docker_compose role
# Infrastructure
# Ansible instructions to deploy the infrastructure
#
# 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 <http://www.gnu.org/licenses/>.
- name: Ensure pip & virtualenv are installed.
ansible.builtin.package:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop:
- name: "python-pip"
state: "{{ docker_compose_python_pip_package_state }}"
- name: "python-virtualenv"
state: "{{ docker_compose_python_virtualenv_package_state }}"
when:
- docker_compose_python_package_install
become: true

View file

@ -1,32 +0,0 @@
---
# Tasks file for the docker_compose role
# Infrastructure
# Ansible instructions to deploy the infrastructure
#
# Copyright (C) 2021 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 <http://www.gnu.org/licenses/>.
- name: Ensure pip & virtualenv are installed.
ansible.builtin.package:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop:
- name: "python3-pip"
state: "{{ docker_compose_python_pip_package_state }}"
- name: "python3-virtualenv"
state: "{{ docker_compose_python_virtualenv_package_state }}"
when:
- docker_compose_python_package_install
become: true

View file

@ -1,64 +0,0 @@
---
# Tasks file for the docker-compose role
# Infrastructure
# Ansible instructions to deploy the infrastructure
# 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 <http://www.gnu.org/licenses/>.
- name: Ensure package install state
ansible.builtin.package:
name: "{{ docker_compose_package }}"
state: "{{ docker_compose_package_state }}"
become: true
- name: "Select tasks for {{ ansible_distribution }} {{ ansible_distribution_major_version }}" # noqa name[template]
ansible.builtin.include_tasks: "{{ distro_file }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
loop_control:
loop_var: distro_file
- name: Install docker-compose python package.
ansible.builtin.pip:
name: "{{ docker_compose_pip_package }}"
state: "{{ docker_compose_pip_package_state }}"
virtualenv: "{{ docker_compose_python_package_path }}"
virtualenv_python: "python{{ ansible_python_version | regex_search('\\d+\\.\\d+') }}"
version: "{{ docker_compose_pip_package_version | default(omit) }}"
become: true
changed_when: false
when: docker_compose_python_package_install
- name: Deploy docker-compose wrapper
ansible.builtin.template:
src: bin/docker-compose.j2
dest: "{{ docker_compose_wrapper_path }}"
owner: 'root'
group: 'root'
mode: '0755'
become: true
when:
- docker_compose_install_wrapper
- name: Create symlink in /usr/bin for wrapper
ansible.builtin.file:
src: "{{ docker_compose_wrapper_path }}"
dest: "/usr/bin/docker-compose"
state: link
become: true
when:
- docker_compose_install_wrapper

View file

@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Infrastructure
# Ansible instructions to deploy the infrastructure
# 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 <http://www.gnu.org/licenses/>.
set -eo pipefail
exec {{ docker_compose_python_package_path }}/bin/docker-compose "$@"

View file

@ -41,4 +41,3 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose

View file

@ -41,4 +41,3 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,4 +41,3 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,4 +41,3 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik

View file

@ -41,4 +41,3 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose

View file

@ -41,4 +41,3 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose

View file

@ -41,4 +41,3 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose

View file

@ -41,5 +41,4 @@ galaxy_info:
dependencies:
- role: docker
- role: docker_compose
- role: traefik