From 47849b8ff7da3f9de8aa02f37f879ce0ff5e25f0 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Wed, 25 Mar 2020 04:03:03 -0400 Subject: [PATCH] docker: Fix docker install on CentOS/RHEL 8 (#5820) we can't set module_hotfixes=True using yum_repository ansible module Fixes 38688a44866d5ee612f80c16ef81e135d1347653 (keep docker-ce.repo name) Signed-off-by: Etienne Champetier --- roles/container-engine/docker/tasks/main.yml | 11 +++-------- .../templates/rh_docker.repo.j2 | 0 2 files changed, 3 insertions(+), 8 deletions(-) rename roles/container-engine/{containerd => docker}/templates/rh_docker.repo.j2 (100%) diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index 4366af06a..b942fea67 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -102,14 +102,9 @@ when: ansible_distribution == "Fedora" and not is_ostree - name: Configure docker repository on RedHat/CentOS/Oracle Linux - yum_repository: - name: docker-ce - baseurl: "{{ docker_rh_repo_base_url }}" - description: "Docker CE Stable - $basearch" - gpgcheck: yes - gpgkey: "{{ docker_rh_repo_gpgkey }}" - keepcache: "{{ docker_rpm_keepcache | default('1') }}" - proxy: " {{ http_proxy | default('_none_') }}" + template: + src: "rh_docker.repo.j2" + dest: "{{ yum_repo_dir }}/docker-ce.repo" when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_ostree - name: check if container-selinux is available diff --git a/roles/container-engine/containerd/templates/rh_docker.repo.j2 b/roles/container-engine/docker/templates/rh_docker.repo.j2 similarity index 100% rename from roles/container-engine/containerd/templates/rh_docker.repo.j2 rename to roles/container-engine/docker/templates/rh_docker.repo.j2