#!/bin/sh
# Install Puppet via apt
set -e

if [ "`id -u`" != "0" ]; then
    echo "This script must be run as root." >&2
    echo "EUID = $EUID" >&2
    exit 1
fi

if ! which puppet >/dev/null 2>&1; then
    apt-get update >/dev/null 2>&1
    DEBIAN_FRONTEND=noninteractive apt-get \
        -y \
        -o Dpkg::Options::="--force-confdef" \
        -o Dpkg::Options::="--force-confold" \
        install puppet >/dev/null 2>&1
fi
# T192728: ensure some directories exist
mkdir -p /etc/puppetlabs/facter/facts.d >/dev/null 2>&1

#!/bin/sh
# Install Puppet via apt
set -e

if [ "`id -u`" != "0" ]; then
    echo "This script must be run as root." >&2
    echo "EUID = $EUID" >&2
    exit 1
fi

if ! which puppet >/dev/null 2>&1; then
    apt-get update --allow-releaseinfo-change >/dev/null 2>&1
    DEBIAN_FRONTEND=noninteractive apt-get \
        -y \
        -o Dpkg::Options::="--force-confdef" \
        -o Dpkg::Options::="--force-confold" \
        install puppet >/dev/null 2>&1
fi
# T192728: ensure some directories exist
mkdir -p /etc/puppetlabs/facter/facts.d >/dev/null 2>&1

Add --allow-releaseinfo-change to apt update
Add --allow-releaseinfo-change to apt update

Running apt-get update on an older base box will result in errors like

  N: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Version' value from '10.2' to '10.13'
  E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
  N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

which prevent support/puppet-bootstrap.sh from succeeding, and cause
vagrant provision to exit without doing or printing anything.

Bug: T256822
Change-Id: Iccfd56c60568f7aa33d0719349e79eb2ef1270bd
