9
0
Fork 1

GPG fixes

This commit is contained in:
Johan Björklund 2024-11-21 10:51:14 +01:00
parent 5a62a54e3c
commit ac668fd1d1
Signed by: bjorklund
GPG key ID: 5E8401339C7F5037

View file

@ -311,6 +311,13 @@ class soc::intelmq(
sunet::snippets::secret_file { "/opt/intelmq/.gnupg/${privkey}.asc":
hiera_key => 'gnupg.privkey'
}
file { "/opt/intelmq/.gnupg/${privkey}.asc":
ensure => present,
replace => false,
onwer => 'intelmq',
group => 'intelmq',
mode => '0500',
}
exec { 'Import private gpg key':
command => "sudo -u intelmq /usr/bin/gpg -import /opt/intelmq/.gnupg/${privkey}.asc",
unless => "gpg -K ${privkey} 2>&1 > /dev/null",