TT#62000 Install dirmngr package before puppet run

Initially dirmngr package was installed to allow running apt-key inside
deployment.sh to install puppetlabs key. Then after moving puppetlabs
key to local file package installation was removed. But we still need it
for successful first puppet run that also uses apt-key. Otherwise there
is the error: 'Could not find a suitable provider for apt_key'. Puppet
also installs dirmngr package but in such case only the second puppet run
will be successful so we need to install the package before the very
first puppet run.

Change-Id: I28edbd8c91c841074ac1b3f1eb6df16e14daa084
changes/29/31729/1
Sergii Kipot 7 years ago
parent 6504dad869
commit 300d09ca6e

@ -2101,6 +2101,15 @@ puppet_install_from_puppet () {
chroot $TARGET apt-get -y install resolvconf libnss-myhostname
case "$DEBIAN_RELEASE" in
stretch|buster)
if [ ! -x "${TARGET}/usr/bin/dirmngr" ] ; then
echo "Installing dirmngr on Debian ${DEBIAN_RELEASE}, otherwise the first puppet run fails: 'Could not find a suitable provider for apt_key'"
chroot $TARGET apt-get -y install dirmngr
fi
;;
esac
echo "Installing 'puppet-agent' with dependencies"
cat >> ${TARGET}/etc/apt/sources.list.d/puppetlabs.list << EOF
deb ${DEBIAN_URL}/puppetlabs/ ${DEBIAN_RELEASE} main puppet5 dependencies

Loading…
Cancel
Save