From 8aa042be50359bd150e5e24ae4c19bad3ff892c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Gombeaud?= Date: Wed, 3 Sep 2025 08:57:33 +0200 Subject: [PATCH] Specify RedHat-specific repo Fixes #515 --- README.md | 4 ++-- defaults/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0dc95f1..2d2bcf2 100644 --- a/README.md +++ b/README.md @@ -103,10 +103,10 @@ You can change `docker_apt_gpg_key` to a different url if you are behind a firew Usually in combination with changing `docker_apt_repository` as well. `docker_apt_filename` controls the name of the source list file created in `sources.list.d`. If you are upgrading from an older (<7.0.0) version of this role, you should change this to the name of the existing file (e.g. `download_docker_com_linux_debian` on Debian) to avoid conflicting lists. ```yaml -docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_facts.distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo" +docker_yum_repo_url: "{{ docker_repo_url }}/{{ 'fedora' if ansible_facts.distribution == 'Fedora' else 'rhel' if ansible_facts.distribution == 'RedHat' else 'centos' }}/docker-{{ docker_edition }}.repo" docker_yum_repo_enable_nightly: '0' docker_yum_repo_enable_test: '0' -docker_yum_gpg_key: "{{ docker_repo_url }}/{{ (ansible_facts.distribution == 'Fedora') | ternary('fedora', 'centos') }}/gpg" +docker_yum_gpg_key: "{{ docker_repo_url }}/{{ 'fedora' if ansible_facts.distribution == 'Fedora' else 'rhel' if ansible_facts.distribution == 'RedHat' else 'centos' }}/gpg" ``` (Used only for RedHat/CentOS.) You can enable the Nightly or Test repo by setting the respective vars to `1`. diff --git a/defaults/main.yml b/defaults/main.yml index 07a8016..a2a06a1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -56,10 +56,10 @@ docker_apt_gpg_key_checksum: "sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807c docker_apt_filename: "docker" # Used only for RedHat/CentOS/Fedora. -docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_facts.distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo" +docker_yum_repo_url: "{{ docker_repo_url }}/{{ 'fedora' if ansible_facts.distribution == 'Fedora' else 'rhel' if ansible_facts.distribution == 'RedHat' else 'centos' }}/docker-{{ docker_edition }}.repo" docker_yum_repo_enable_nightly: '0' docker_yum_repo_enable_test: '0' -docker_yum_gpg_key: "{{ docker_repo_url }}/{{ (ansible_facts.distribution == 'Fedora') | ternary('fedora', 'centos') }}/gpg" +docker_yum_gpg_key: "{{ docker_repo_url }}/{{ 'fedora' if ansible_facts.distribution == 'Fedora' else 'rhel' if ansible_facts.distribution == 'RedHat' else 'centos' }}/gpg" # A list of users who will be added to the docker group. docker_users: []