From 55d8ed093a00e4d98b89a095a6234b0c43854c87 Mon Sep 17 00:00:00 2001
From: Florian Ruynat <16313165+floryut@users.noreply.github.com>
Date: Fri, 25 Sep 2020 15:11:11 +0200
Subject: [PATCH] Add centos8 docker repo (#6747)

---
 roles/container-engine/docker/defaults/main.yml | 2 +-
 roles/container-engine/docker/vars/redhat.yml   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/roles/container-engine/docker/defaults/main.yml b/roles/container-engine/docker/defaults/main.yml
index bc96dc8de..b80efe5e9 100644
--- a/roles/container-engine/docker/defaults/main.yml
+++ b/roles/container-engine/docker/defaults/main.yml
@@ -33,7 +33,7 @@ docker_yum_conf: /etc/yum_docker.conf
 docker_fedora_repo_base_url: 'https://download.docker.com/linux/fedora/{{ ansible_distribution_major_version }}/$basearch/stable'
 docker_fedora_repo_gpgkey: 'https://download.docker.com/linux/fedora/gpg'
 # CentOS/RedHat docker-ce repo
-docker_rh_repo_base_url: 'https://download.docker.com/linux/centos/7/$basearch/stable'
+docker_rh_repo_base_url: 'https://download.docker.com/linux/centos/{{ ansible_distribution_major_version }}/$basearch/stable'
 docker_rh_repo_gpgkey: 'https://download.docker.com/linux/centos/gpg'
 # Ubuntu docker-ce repo
 docker_ubuntu_repo_base_url: "https://download.docker.com/linux/ubuntu"
diff --git a/roles/container-engine/docker/vars/redhat.yml b/roles/container-engine/docker/vars/redhat.yml
index 1a4988843..397916c0b 100644
--- a/roles/container-engine/docker/vars/redhat.yml
+++ b/roles/container-engine/docker/vars/redhat.yml
@@ -12,14 +12,14 @@ docker_versioned_pkg:
   '18.03': docker-ce-18.03.1.ce-1.el7.centos
   '18.06': docker-ce-18.06.3.ce-3.el7
   '18.09': docker-ce-18.09.9-3.el7
-  '19.03': docker-ce-19.03.13-3.el7
-  'stable': docker-ce-19.03.13-3.el7
-  'edge': docker-ce-19.03.13-3.el7
+  '19.03': docker-ce-19.03.13-3.el{{ ansible_distribution_major_version }}
+  'stable': docker-ce-19.03.13-3.el{{ ansible_distribution_major_version }}
+  'edge': docker-ce-19.03.13-3.el{{ ansible_distribution_major_version }}
 
 docker_cli_versioned_pkg:
   'latest': docker-ce-cli
   '18.09': docker-ce-cli-18.09.9-3.el7
-  '19.03': docker-ce-cli-19.03.13-3.el7
+  '19.03': docker-ce-cli-19.03.13-3.el{{ ansible_distribution_major_version }}
 
 docker_selinux_versioned_pkg:
   'latest': docker-ce-selinux-17.03.3.ce-1.el7
-- 
GitLab