From e8f50a54466baad3cce3872500e1899cdccb9252 Mon Sep 17 00:00:00 2001 From: Maxim Burgerhout Date: Sat, 30 Nov 2024 14:57:03 +0100 Subject: [PATCH] Add support for CentOS, Rocky and Alma Role is supposed to support RHEL derivatives as well. Only Fedora is different for now. --- vars/main.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vars/main.yml b/vars/main.yml index 7bc6d34..a8fe29c 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -21,12 +21,21 @@ docker_channels: - test docker_cmd_enable_disable_repo: - RedHat: > + AlmaLinux: > + type dnf && dnf config-manager --set-{{ (_item_enabled == true) | ternary('enabled', 'disabled') }} docker-ce-{{ item }} + || yum-config-manager --{{ (_item_enabled == true) | ternary('enable', 'disable') }} docker-ce-{{ item }} + CentOS: > type dnf && dnf config-manager --set-{{ (_item_enabled == true) | ternary('enabled', 'disabled') }} docker-ce-{{ item }} || yum-config-manager --{{ (_item_enabled == true) | ternary('enable', 'disable') }} docker-ce-{{ item }} Fedora: > dnf config-manager --set-{{ (_item_enabled == true) | ternary('enabled', 'disabled') }} docker-ce-{{ item }} || dnf config-manager setopt docker-ce-{{item}}.enabled={{ (_item_enabled == true) | ternary('1', '0') }} + RedHat: > + type dnf && dnf config-manager --set-{{ (_item_enabled == true) | ternary('enabled', 'disabled') }} docker-ce-{{ item }} + || yum-config-manager --{{ (_item_enabled == true) | ternary('enable', 'disable') }} docker-ce-{{ item }} + Rocky: > + type dnf && dnf config-manager --set-{{ (_item_enabled == true) | ternary('enabled', 'disabled') }} docker-ce-{{ item }} + || yum-config-manager --{{ (_item_enabled == true) | ternary('enable', 'disable') }} docker-ce-{{ item }} docker_cmd_update_repo_cache: RedHat: type dnf && dnf makecache || yum makecache