Revision 999cd65c
Added by dustin tsang over 9 years ago
manifests/ssltools/certutil.pp | ||
---|---|---|
# type to append cert to nssdb
|
||
define certs::ssltools::certutil($nss_db_dir, $client_cert, $cert_name=$title, $refreshonly = true) {
|
||
File[$nss_db_dir] ->
|
||
exec { "delete ${cert_name}":
|
||
path => ['/bin', '/usr/bin'],
|
||
unless => "certutil -D -d ${nss_db_dir} -n '${cert_name}'",
|
||
command => "certutil -D -d ${nss_db_dir} -n '${cert_name}'",
|
||
onlyif => "certutil -L -d ${nss_db_dir} | grep '${cert_name}'",
|
||
logoutput => true,
|
||
refreshonly => $refreshonly,
|
||
} ->
|
||
exec { $cert_name:
|
||
path => ['/bin', '/usr/bin'],
|
||
command => "certutil -A -d '${nss_db_dir}' -n '${cert_name}' -t ',,' -a -i '${client_cert}'",
|
||
unless => "certutil -L -d ${nss_db_dir} | grep '${cert_name}'",
|
||
logoutput => true,
|
||
refreshonly => $refreshonly,
|
||
}
|
||
}
|
Also available in: Unified diff
Fixes #8850 - import gutterball cert after katello nssdb exists