Skip to content

Commit

Permalink
Add support for CentOS, Rocky and Alma
Browse files Browse the repository at this point in the history
Role is supposed to support RHEL derivatives as well. Only Fedora is
different for now.
  • Loading branch information
wzzrd authored and haxorof committed Dec 8, 2024
1 parent 92b45aa commit e8f50a5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8f50a5

Please sign in to comment.