From 4f4c332aa1246f9ed46bd2ee3a70ded33f635894 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Fri, 27 Aug 2021 15:51:15 -0500 Subject: [PATCH] PR #295: Additional docs fixes for docker_repo_url. --- README.md | 12 ++++++++---- defaults/main.yml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7c38cb5..47b0857 100644 --- a/README.md +++ b/README.md @@ -33,21 +33,25 @@ Variables to control the state of the `docker` service, and whether it should st Docker Compose installation options. + docker_repo_url: https://download.docker.com/linux + +The main Docker repo URL, common between Debian and RHEL systems. + docker_apt_release_channel: stable docker_apt_arch: amd64 - docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" + docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" docker_apt_ignore_key_error: True - docker_apt_gpg_key: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg + docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_distribution | lower }}/gpg" (Used only for Debian/Ubuntu.) You can switch the channel to `nightly` if you want to use the Nightly release. You can change `docker_apt_gpg_key` to a different url if you are behind a firewall or provide a trustworthy mirror. Usually in combination with changing `docker_apt_repository` as well. - docker_yum_repo_url: https://download.docker.com/linux/centos/docker-{{ docker_edition }}.repo + docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"docker_edition }}.repo docker_yum_repo_enable_nightly: '0' docker_yum_repo_enable_test: '0' - docker_yum_gpg_key: https://download.docker.com/linux/centos/gpg + docker_yum_gpg_key: "{{ docker_repo_url }}/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 ac6946e..1b9de37 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,7 +15,7 @@ docker_compose_version: "1.26.0" docker_compose_url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64 docker_compose_path: /usr/local/bin/docker-compose -# Docker repo url common for linux +# Docker repo URL. docker_repo_url: https://download.docker.com/linux # Used only for Debian/Ubuntu. Switch 'stable' to 'nightly' if needed.