diff --git a/roles/container-engine/docker/templates/rh_docker.repo.j2 b/roles/container-engine/containerd/templates/rh_docker.repo.j2 similarity index 100% rename from roles/container-engine/docker/templates/rh_docker.repo.j2 rename to roles/container-engine/containerd/templates/rh_docker.repo.j2 diff --git a/roles/container-engine/docker/defaults/main.yml b/roles/container-engine/docker/defaults/main.yml index ab9a4fb74..57c841e85 100644 --- a/roles/container-engine/docker/defaults/main.yml +++ b/roles/container-engine/docker/defaults/main.yml @@ -39,10 +39,10 @@ docker_ubuntu_repo_gpgkey: 'https://download.docker.com/linux/ubuntu/gpg' docker_debian_repo_base_url: "https://download.docker.com/linux/debian" docker_debian_repo_gpgkey: 'https://download.docker.com/linux/debian/gpg' # dockerproject repo -dockerproject_rh_repo_base_url: 'https://yum.dockerproject.org/repo/main/centos/7' -dockerproject_rh_repo_gpgkey: 'https://yum.dockerproject.org/gpg' -dockerproject_apt_repo_base_url: 'https://apt.dockerproject.org/repo' -dockerproject_apt_repo_gpgkey: 'https://apt.dockerproject.org/gpg' +dockerproject_rh_repo_base_url: 'https://download.docker.com/linux/centos/7/$basearch/stable' +dockerproject_rh_repo_gpgkey: 'https://download.docker.com/linux/centos/gpg' +dockerproject_apt_repo_base_url: 'https://download.docker.com/linux/debian' +dockerproject_apt_repo_gpgkey: 'https://download.docker.com/linux/debian/gpg' docker_bin_dir: "/usr/bin" # CentOS/RedHat Extras repo extras_rh_repo_base_url: "http://mirror.centos.org/centos/$releasever/extras/$basearch/" @@ -67,4 +67,4 @@ docker_remove_packages_yum: docker_remove_packages_apt: - docker - docker-engine - - docker.io \ No newline at end of file + - docker.io diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index c87961ac9..bd86ef0b5 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -27,9 +27,6 @@ tags: - facts -# https://yum.dockerproject.org/repo/main/opensuse/ contains packages for an EOL -# openSUSE version so we can't use it. The only alternative is to use the docker -# packages from the distribution repositories. - name: Warn about Docker version on SUSE debug: msg: "SUSE distributions always install Docker from the distro repos" @@ -105,9 +102,14 @@ when: ansible_distribution == "Fedora" and not is_atomic - name: Configure docker repository on RedHat/CentOS/Oracle Linux - template: - src: "rh_docker.repo.j2" - dest: "{{ yum_repo_dir }}/docker.repo" + yum_repository: + name: docker-ce + baseurl: "{{ dockerproject_rh_repo_base_url }}" + description: "Docker CE Stable - $basearch" + gpgcheck: yes + gpgkey: "{{ dockerproject_rh_repo_gpgkey }}" + keepcache: "{{ docker_rpm_keepcache | default('1') }}" + proxy: " {{ http_proxy | default('_none_') }}" when: ansible_distribution in ["CentOS","RedHat","OracleLinux"] and not is_atomic - name: check if container-selinux is available diff --git a/roles/container-engine/docker/vars/debian.yml b/roles/container-engine/docker/vars/debian.yml index c1945bf8c..2a10d9780 100644 --- a/roles/container-engine/docker/vars/debian.yml +++ b/roles/container-engine/docker/vars/debian.yml @@ -2,7 +2,6 @@ docker_kernel_min_version: '3.10' # https://download.docker.com/linux/debian/ -# https://apt.dockerproject.org/repo/dists/debian-wheezy/main/filelist docker_versioned_pkg: 'latest': docker-ce '1.13': docker-engine=1.13.1-0~debian-{{ ansible_distribution_release|lower }} diff --git a/roles/container-engine/docker/vars/redhat.yml b/roles/container-engine/docker/vars/redhat.yml index 047077ee1..48bb55018 100644 --- a/roles/container-engine/docker/vars/redhat.yml +++ b/roles/container-engine/docker/vars/redhat.yml @@ -3,7 +3,6 @@ docker_kernel_min_version: '0' # https://docs.docker.com/engine/installation/linux/centos/#install-from-a-package # https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ -# https://yum.dockerproject.org/repo/main/centos/7 # or do 'yum --showduplicates list docker-engine' docker_versioned_pkg: 'latest': docker-ce