Skip to content

Commit

Permalink
Adding option to not manage pubkey as well as workaround for issue lv…
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeluxe committed Oct 4, 2022
1 parent 6074332 commit d4b9d17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
21 changes: 11 additions & 10 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,19 @@
}
}

$selector = $key['selector']
$domain = $key['domain']
$publickey = $key['publickey']
if($opendkim::manage_public_keys == true) {
$selector = $key['selector']
$domain = $key['domain']
$publickey = $key['publickey']

file { "${opendkim::configdir}/keys/${key['domain']}/${key['selector']}.txt":
ensure => 'file',
content => template('opendkim/public-rsa-key.erb'),
owner => 'root',
group => $opendkim::group,
mode => '0640',
file { "${opendkim::configdir}/keys/${key['domain']}/${key['selector']}.txt":
ensure => 'file',
content => template('opendkim/public-rsa-key.erb'),
owner => 'root',
group => $opendkim::group,
mode => '0640',
}
}

}

}
Expand Down
5 changes: 3 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
Optional[String] $trustanchorfile = $opendkim::params::trustanchorfile,
Optional[Array] $senderheaders = $opendkim::params::senderheaders,
Boolean $manage_private_keys = $opendkim::params::manage_private_keys,
Boolean $manage_public_keys = $opendkim::params::manage_public_keys,
Boolean $alldomain = $opendkim::params::alldomain,
Optional[String] $selector = $opendkim::params::selector,
Optional[String] $publickey = $opendkim::params::publickey,
Expand All @@ -38,8 +39,8 @@
Array[Struct[{
domain => String,
selector => String,
publickey => String,
privatekey => Variant[String,Deferred],
publickey => Optional[String],
privatekey => Optional[Variant[String,Deferred]],
signingdomains => Array[String],
}]] $keys = $opendkim::params::keys,

Expand Down

0 comments on commit d4b9d17

Please sign in to comment.