added option to set docker gpg key

This commit is contained in:
Felix Herzog
2019-03-19 19:33:20 +01:00
parent fa1a56824e
commit 5a4045d5c1
4 changed files with 7 additions and 3 deletions

View File

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

View File

@@ -9,7 +9,7 @@
- name: Add Docker GPG key.
rpm_key:
key: https://download.docker.com/linux/centos/gpg
key: "{{ docker_yum_gpg_key }}"
state: present
- name: Add Docker repository.