Pass is required by multiple operations

This commit is contained in:
Johan Wassberg 2024-03-05 12:14:34 +01:00
parent 09ad0f07f9
commit a3d87c09d3
Signed by: jocar
GPG key ID: BE4EC2EEADF2C31B

View file

@ -19,13 +19,12 @@ class eid::idm_app (
ensure => latest
}
$pass = 'qwerty123'
exec { 'infra.p12':
command => "keytool -import -noprompt -deststorepass ${pass} -file /etc/ssl/certs/infra.crt -keystore /etc/ssl/certs/infra.p12",
onlyif => 'test ! -f /etc/ssl/certs/infra.p12'
}
# Unwanted password - but hey Java!
$pass = 'qwerty123'
exec { "${facts['networking']['fqdn']}_infra.p12":
command => "openssl pkcs12 -export -in /etc/ssl/certs/${facts['networking']['fqdn']}_infra.crt -inkey /etc/ssl/private/${facts['networking']['fqdn']}_infra.pem -name 'infra' -out /etc/ssl/private/${facts['networking']['fqdn']}_infra.p12 -passout pass:${pass}",
onlyif => "test ! -f /etc/ssl/private/${facts['networking']['fqdn']}_infra.p12"