From 054e74268ee7a373f1d5b47bc882f86e1df39ddb Mon Sep 17 00:00:00 2001 From: toxinu Date: Tue, 23 Mar 2021 15:53:43 +0900 Subject: [PATCH 1/2] Do not install gnupg2 on Ubuntu 20.04 and superior --- tasks/setup-Debian.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index d701135..89c0b6d 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -11,9 +11,14 @@ name: - apt-transport-https - ca-certificates - - gnupg2 state: present +- name: Ensure gnupg2 dependency is installed. + apt: + name: gnupg2 + state: present + when: ansible_distribution != 'Ubuntu' or ansible_distribution_version is version('20.04', '<') + - name: Add Docker apt key. apt_key: url: "{{ docker_apt_gpg_key }}" From 09df8f56889ecad264aa321f50113e408a5c3097 Mon Sep 17 00:00:00 2001 From: toxinu Date: Wed, 24 Mar 2021 11:26:04 +0900 Subject: [PATCH 2/2] Add gnupg for systems >= Ubuntu 20.04 --- tasks/setup-Debian.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 89c0b6d..f4630f9 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -13,12 +13,18 @@ - ca-certificates state: present -- name: Ensure gnupg2 dependency is installed. +- name: Ensure additionnal dependencies are installed (on Ubuntu < 20.04 and any other systems). apt: name: gnupg2 state: present when: ansible_distribution != 'Ubuntu' or ansible_distribution_version is version('20.04', '<') +- name: Ensure additionnal dependencies are installed (on Ubuntu >= 20.04). + apt: + name: gnupg + state: present + when: ansible_distribution == 'Ubuntu' or ansible_distribution_version is version('20.04', '>=') + - name: Add Docker apt key. apt_key: url: "{{ docker_apt_gpg_key }}"