On Redhat family systems, the GPG keys get imported every run since the exec call is returning false.
The fix appears to be ensure upper and lower are wrapped around single quotes to prevent expansion.
echo "ABCDEFG" | tr [:upper:] [:lower:]
|
tr: misaligned [:upper:] and/or [:lower:] construct
|
echo "ABCDEFG" | tr '[:upper:]' '[:lower:]'
|
abcdefg
|
rpm -q gpg-pubkey-`echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs) | cut --characters=11-18 | tr [:upper:] [:lower:] tr: misaligned [:upper:] and/or [:lower:] construct
|
package gpg-pubkey- is not installed
|
rpm -q gpg-pubkey-`echo $(gpg --throw-keyids < /etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs) | cut --characters=11-18 | tr '[:upper:]' '[:lower:]'`
|
gpg-pubkey-4bd6ec30-4c37bb40
|