CentOS: Ensure that GPG keys are imported

In the cache preparation process we copy the host's GPG
keys into the container, but we never import them.

This can result in the following error when trying to
execute the package installation later:

"You have enabled checking of packages via GPG keys. This
is a good thing. However, you do not have any GPG public
keys installed."

Change-Id: I971769e588014ebb814d8549966c9a0c9715155e
This commit is contained in:
Jesse Pretorius 2017-03-14 13:20:29 +00:00
parent acfd0a189e
commit bfc63bd0f1

View File

@ -51,6 +51,7 @@ lxc_cache_map:
{% for resolver in lxc_cache_prep_dns %}
echo "nameserver {{ resolver }}" >> /etc/resolv.conf
{% endfor %}
rpm --import /etc/pki/rpm-gpg/*
yum install -y {{ lxc_cache_distro_packages | join(' ') }}
rm -f /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python