common: install dependencies for apt modules

When using a minimal Debian/Ubuntu distribution there's no
ca-certificates and gpg packages installed so the apt modules will
fail:

Failed to find required executable gpg in paths:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

apt.cache.FetchFailedException:
W:https://download.ceph.com/debian-luminous/dists/bionic/InRelease:
No system certificates available. Try installing ca-certificates.

Resolves: #3994

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 494746b7a6)
pull/4008/head
Dimitri Savineau 2019-05-17 10:31:46 -04:00 committed by Guillaume Abrioux
parent 32e966db73
commit bcafb182c4
2 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,11 @@
--- ---
- name: install dependencies for apt modules
package:
name: ['apt-transport-https', 'ca-certificates', 'gpg', 'software-properties-common']
update_cache: yes
register: result
until: result is succeeded
- name: configure debian ceph community repository stable key - name: configure debian ceph community repository stable key
apt_key: apt_key:
data: "{{ lookup('file', role_path+'/files/cephstable.asc') }}" data: "{{ lookup('file', role_path+'/files/cephstable.asc') }}"

View File

@ -6,7 +6,7 @@
- name: allow apt to use a repository over https (debian) - name: allow apt to use a repository over https (debian)
package: package:
name: ['apt-transport-https', 'ca-certificates', 'software-properties-common'] name: ['apt-transport-https', 'ca-certificates', 'gpg', 'software-properties-common']
update_cache: yes update_cache: yes
register: result register: result
until: result is succeeded until: result is succeeded