refactor!(docker): Remove centos support & fix install on other redhat dists

This commit is contained in:
Saibotk 2024-08-14 00:42:56 +02:00
parent e7a172877b
commit ecefb84a4b
Signed by: saibotk
GPG key ID: 67585F0065E261D5
3 changed files with 2 additions and 60 deletions

View file

@ -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"

View file

@ -6,9 +6,6 @@ galaxy_info:
standalone: true
platforms:
- name: EL
versions:
- all
- name: Fedora
versions:
- all

View file

@ -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 <http://www.gnu.org/licenses/>.
- 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