Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
change pkcs12 file generation to be based on existence of the output …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
Joshua Hoblitt committed Jan 15, 2014
1 parent 5011b56 commit c208f6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions manifests/add_cert_and_key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
$pkcs12_name = downcase(regsubst("${nickname}.p12", '[\s]', '_', 'GM'))

exec {"generate_pkcs12_${title}":
command => "/usr/bin/openssl pkcs12 -export -in ${cert} -inkey ${key} -password 'file:${certdir}/password.conf' -out '${certdir}/${pkcs12_name}' -name '${nickname}'",
require => [
command => "/usr/bin/openssl pkcs12 -export -in ${cert} -inkey ${key} -password 'file:${certdir}/password.conf' -out '${certdir}/${pkcs12_name}' -name '${nickname}'",
require => [
Nssdb::Create[$certdir],
Class['nssdb'],
],
subscribe => File["${certdir}/password.conf"],
refreshonly => true,
creates => "${certdir}/${pkcs12_name}",
subscribe => File["${certdir}/password.conf"],
}

exec { "add_pkcs12_${title}":
Expand Down
1 change: 1 addition & 0 deletions spec/defines/nssdb_add_cert_and_key_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'Nssdb::Create[/dne]',
'Class[Nssdb]'
],
:creates => '/dne/server-cert.p12',
:subscribe => 'File[/dne/password.conf]'
)
end
Expand Down

0 comments on commit c208f6e

Please sign in to comment.