Testing stuff for mailgen
This commit is contained in:
parent
3f18f25070
commit
5a62a54e3c
2 changed files with 17 additions and 0 deletions
|
@ -14,6 +14,7 @@ class soc::intelmq(
|
|||
$api_pass = lookup('intelmq_api_user.password', undef, undef, 'pass')
|
||||
$db_user = lookup('intelmq_db_user.username', undef, undef, 'test')
|
||||
$db_pass = lookup('intelmq_db_user.password', undef, undef, 'pass')
|
||||
$privkey = lookup('gnupg.keyid', undef, undef, undef)
|
||||
|
||||
group { 'intelmq':
|
||||
ensure => present,
|
||||
|
@ -298,7 +299,22 @@ class soc::intelmq(
|
|||
mode => '0440',
|
||||
content => template('soc/intelmq/intelmq-mailgen.conf.erb'),
|
||||
;
|
||||
}
|
||||
|
||||
file { '/opt/intelmq/.gnupg':
|
||||
ensure => directory,
|
||||
owner => 'intelmq',
|
||||
group => 'intelmq',
|
||||
mode => '0700',
|
||||
}
|
||||
if lookup('gnupg.privkey', undef, undef, undef) != undef {
|
||||
sunet::snippets::secret_file { "/opt/intelmq/.gnupg/${privkey}.asc":
|
||||
hiera_key => 'gnupg.privkey'
|
||||
}
|
||||
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",
|
||||
}
|
||||
}
|
||||
|
||||
file { '/etc/systemd/system/intelmq-api.service':
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue