Merge pull request #268 from toxinu/gnupg2-ubuntu-20-04

Do not install gnupg2 on Ubuntu 20.04 and superior
This commit is contained in:
Jeff Geerling 2021-03-25 13:30:21 -05:00 committed by GitHub
commit 85ab2a940c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,9 +11,20 @@
name: name:
- apt-transport-https - apt-transport-https
- ca-certificates - ca-certificates
- gnupg2
state: present state: present
- 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. - name: Add Docker apt key.
apt_key: apt_key:
url: "{{ docker_apt_gpg_key }}" url: "{{ docker_apt_gpg_key }}"