From 09df8f56889ecad264aa321f50113e408a5c3097 Mon Sep 17 00:00:00 2001 From: toxinu Date: Wed, 24 Mar 2021 11:26:04 +0900 Subject: [PATCH] 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 }}"