Install gpg and sudo binary for Debian based systems

apt_key module requires gpg to be installed [1], however Debian do not
include gpg in it's minimal deployment. So we're ensuring that binary
exists before calling apt_key module

sudo is required for rootwrap and is not shipped with Debian by default

[1] https://docs.ansible.com/ansible/latest/modules/apt_key_module.html#requirements

Change-Id: I3005bd733f64319a93ab40b51415f3cb8f51b48d
This commit is contained in:
Dmitriy Rabotyagov 2020-02-05 15:07:22 +02:00
parent 5109d93593
commit f4c47e180b
2 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,15 @@
# APT configuration tasks that apply on all nodes.
- name: Install gpg tooling for key management
apt:
name: gnupg
state: "{{ openstack_hosts_package_state }}"
register: _install_gpg
until: _install_gpg is success
retries: 5
delay: 2
- name: Add/Remove repositories gpg keys manually
apt_key:
id: "{{ key.id | default(omit) }}"

View File

@ -73,6 +73,7 @@ _openstack_host_metal_distro_packages:
- rsyslog
- software-properties-common
- sysstat
- sudo
- time
- vlan
- wget