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
494746b7a661efcf99addd20cfe2ec7b34c4f490)
---
+- 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
apt_key:
data: "{{ lookup('file', role_path+'/files/cephstable.asc') }}"
- name: allow apt to use a repository over https (debian)
package:
- name: ['apt-transport-https', 'ca-certificates', 'software-properties-common']
+ name: ['apt-transport-https', 'ca-certificates', 'gpg', 'software-properties-common']
update_cache: yes
register: result
until: result is succeeded