Juan, Are you exporting extra_files as a mountpoint in fileserver.conf? If not and extra_files is in a module then the path should be puppet:///modules/<modulename>/extra_files/certificates/mycert.org.crt
The documentation at http://docs.puppetlabs.com/guides/file_serving.htmlmight help. Morgan On Tue, May 20, 2014 at 9:30 AM, Juan Sierra Pons <j...@elsotanillo.net>wrote: > 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 j...@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 > > -------------------------------------------------------------------------------------- > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CABS%3Dy9smEYZNWrH82J2n3JEyEa-UFkrKtneVT2v_Yzg%3D4FEohw%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- Morgan Haskel mor...@puppetlabs.com Module Engineer *Join us at PuppetConf 2014, September 23-24 in San Francisco - http://puppetconf.com <http://puppetconf.com>* -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CA%2BFnDv06c8__o%2BwF7pFM8bpSMFdQpRA%3D%3DKFn5H_V3sfSpaf5Eg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.