puppet apt class - adding a APT source with GPG key
I'm using the module: https://github.com/puppetlabs/puppetl...
I configured the below class to create an additional APT source and add the GPG key.
class filebeats_apt {
apt::source { 'Filebeats':
comment => 'Filebeats',
location => 'https://packages.elastic.co/beats/apt',
release => 'stable',
repos => 'main',
key => {
'server' => 'https://packages.elastic.co/GPG-KEY-elasticsearch',
'id' => '30239CC130E1A7FD81A27B140976EAF437D05B5',
},
include => {
'src' => true,
'deb' => true,
},
}
}
Im referencing the class in my main manifest as following:
# Puppetpal
node 'puppetpal' {
include filebeats_apt
}
I keep getting the following error:
Error while evaluating a Resource Statement,
Evaluation Error: Error while evaluating a Function Call, validate_re():
"30239CC130E1A7FD81A27B140976EAF437D05B5" does not match
["\\A(0x)?[0-9a-fA-F]{8}\\Z", "\\A(0x)?[0-9a-fA-F]{16}\\Z", "\\A(0x)?[0-9a-fA-F]{40}\\Z"]
Boy, you gotta refresh your regexp skills. It clearly reads, that it accepts strings of 8, 16, or 40 hexadecimal figures. Your id is just 39 characters long.
oops 🙊 thank you