From 250660e149b2195c97957fca0cfaf16ed404be8e Mon Sep 17 00:00:00 2001 From: Dirk Weise Date: Thu, 22 Feb 2018 10:55:56 +0100 Subject: [PATCH] Make ignoring repository key error optional Just ignoring an error regarding the Docker GPG key and downloading it from "some" web page is not desired in any environment. Change-Id: I2d59e9bf070a4262ff5d251a65b698c858345eb7 --- defaults/main.yml | 1 + tasks/setup-Debian.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3573df1..94042d3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -12,6 +12,7 @@ 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_repository: "deb 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. docker_yum_repo_url: https://download.docker.com/linux/centos/docker-{{ docker_edition }}.repo diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index d0be48d..87f8e4b 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -21,7 +21,7 @@ id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 state: present register: add_repository_key - ignore_errors: true + ignore_errors: "{{ docker_apt_ignore_key_error }}" - name: Ensure curl is present (on older systems without SNI). package: name=curl state=present