Hi,
I am recently using the puppetlabs/java_ks module. The documentation
claims that the module supports puppet:// uri path for certificates:
from
https://forge.puppetlabs.com/puppetlabs/java_ks:
"
certificate
An already-signed certificate to place in the keystore. Accepts local
file paths or puppet:// uri paths.
"
I am using the following code:
java_ks {"$hostname-$certificate":
ensure => latest,
certificate => "puppet:///extra_files/certificates/mycert.org.crt",
target => hiera('java::keystore::path'),
password => hiera('java::certificate::password'),
trustcacerts => true,
}
But when I run the command, the following error appears:
Info: Applying configuration version 'd4944df'
Notice: /Stage[main]/Puppet::Agent::Config/Ini_setting[environment]/value:
value changed 'working_hashes' to 'keystore'
Error: Execution of 'keytool -importcert -noprompt -alias
myserver-mycert.org.crt.org.crt -file
/etc/puppet/files/certificates/mycert.org.crt -keystore /home/devops/
.keystore -trustcacerts' returned 1: Enter keystore password:
Re-enter new password: keytool error: java.io.FileNotFoundException:
/etc/puppet/files/certifi
cates/mycert.org.crt (No such file or directory)
It is referencing the path on the puppet client instead of using the
puppet:/// uri to download the certificate:
keytool -importcert -noprompt -alias myserver-mycert.org.crt.org.crt
-file /etc/puppet/files/certificates/mycert.org.crt -keystore
/home/devops/
Any Idea what I am doing wrong?
Best regards
--------------------------------------------------------------------------------------
Juan Sierra Pons
ju...@elsotanillo.net
Linux User Registered: #257202
Web:
http://www.elsotanillo.net Git:
http://www.github.com/juasiepo
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE
--------------------------------------------------------------------------------------