Pull GPG key from a different source (Debian/Ubuntu)

This commit is contained in:
Sebastián Estrella 2019-11-04 21:56:30 -05:00
parent 416c0c9a06
commit c7a5875b1e
3 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,8 @@ Docker Compose installation options.
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_key: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
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_ignore_key_error: True
(Used only for Debian/Ubuntu.) You can switch the channel to `edge` if you want to use the Edge release.

View File

@ -17,7 +17,8 @@ docker_compose_path: /usr/local/bin/docker-compose
# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
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_key: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
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_ignore_key_error: true
# Used only for RedHat/CentOS/Fedora.

View File

@ -15,7 +15,7 @@
- name: Add Docker apt key.
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
url: "{{ docker_apt_key }}"
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present
register: add_repository_key
@ -28,7 +28,7 @@
- name: Add Docker apt key (alternative for older systems without SNI).
shell: |
set -o pipefail
curl -sSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
curl -sSL {{ docker_apt_key }} | sudo apt-key add -
args:
warn: false
when: add_repository_key is failed