From ecefb84a4bbea26afa007ad44c52e840757ff87d Mon Sep 17 00:00:00 2001 From: Saibotk Date: Wed, 14 Aug 2024 00:42:56 +0200 Subject: [PATCH] refactor!(docker): Remove centos support & fix install on other redhat dists --- roles/docker/defaults/main.yml | 4 +-- roles/docker/meta/main.yml | 3 -- roles/docker/tasks/Rocky.yml | 55 ---------------------------------- 3 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 roles/docker/tasks/Rocky.yml diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 183cd95..59f0243 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -42,11 +42,11 @@ docker_install_repository: true # The repository settings # The repository will be added as a repository to allow downloading/installing the package -docker_yum_repository_url: https://download.docker.com/linux/centos/docker-{{ docker_edition }}.repo +docker_yum_repository_url: https://download.docker.com/linux/{{ ansible_distribution | lower }}/docker-{{ docker_edition }}.repo docker_yum_repository_destination: /etc/yum.repos.d/docker-{{ docker_edition }}.repo # Where to fetch the docker repository GPG key from -docker_yum_repository_gpg_key: https://download.docker.com/linux/centos/gpg +docker_yum_repository_gpg_key: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg # The apt repository settings docker_apt_key_id: "9DC858229FC7DD38854AE2D88D81803C0EBFCD88" diff --git a/roles/docker/meta/main.yml b/roles/docker/meta/main.yml index ccf9303..8477964 100644 --- a/roles/docker/meta/main.yml +++ b/roles/docker/meta/main.yml @@ -6,9 +6,6 @@ galaxy_info: standalone: true platforms: - - name: EL - versions: - - all - name: Fedora versions: - all diff --git a/roles/docker/tasks/Rocky.yml b/roles/docker/tasks/Rocky.yml deleted file mode 100644 index 421c0fd..0000000 --- a/roles/docker/tasks/Rocky.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -# Tasks file for the docker 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 . - -- name: Ensure old versions of Docker are not installed. - ansible.builtin.package: - name: - - docker - - docker-common - - docker-engine - state: absent - become: true - -- name: Ensure buildah & runc are not installed. - ansible.builtin.package: - name: - - buildah - - runc - state: absent - become: true - -- name: Add Docker GPG key. - ansible.builtin.rpm_key: - key: "{{ docker_yum_repository_gpg_key }}" - state: present - when: - - docker_install_repository - become: true - -- name: Add Docker repository. - ansible.builtin.get_url: - url: "{{ docker_yum_repository_url }}" - dest: "{{ docker_yum_repository_destination }}" - owner: root - group: root - mode: "0644" - when: - - docker_install_repository - become: true