Use hkps by default and fallback to hkp for older Debian and Ubuntu releases.

This commit is contained in:
Georgy Berdyshev 2018-07-07 00:30:48 +02:00
parent 8cada84350
commit 194f369e13

View File

@ -1,5 +1,9 @@
--- ---
- set_fact: fallback_keyserver='hkp://p80.pool.sks-keyservers.net:80'
when: (ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie') or
(ansible_distribution == 'Ubuntu' and ansible_distribution_release in ['trusty', 'xenial'])
- name: "(Install: APT OSs) Add APT NGINX Signing Key" - name: "(Install: APT OSs) Add APT NGINX Signing Key"
apt_key: apt_key:
id: 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 id: 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
keyserver: hkp://p80.pool.sks-keyservers.net:80 keyserver: "{{ fallback_keyserver | default('hkps://hkps.pool.sks-keyservers.net:443') }}"