Add gnupg for systems >= Ubuntu 20.04

This commit is contained in:
toxinu 2021-03-24 11:26:04 +09:00
parent 054e74268e
commit 09df8f5688
No known key found for this signature in database
GPG Key ID: B41F53FEBA8E5BD3

View File

@ -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 }}"