You won’t find how to install the JDK on the puppet page describing the package resource. You need to first find out how you would install the JDK to an alternate path – that will be in the JDK documentation and not Puppet. Once you figure it out with the JDK you then specify the parameter in the puppet resource.
I did a quick look but can’t find it on the linux platform (I’m primarily a Windows guy - maybe someone can chime in), but I believe you need to create a properties file with the options you want to set during installation, and I believe it’s the USER_INSTALL_DIR property you’ll want to set. So, find out how to do this silently first w/out puppet, and that will tell you what you need to tell puppet to install it where you want. Sorry I couldn’t be more help on finding the specific parameters on the linux platform – the ones for Windows seem easier to find. From: bobby38 Sent: Thursday, June 26, 2014 1:46 PM To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] installation of package to a different folder Hi Jim, Thank you for your reply. i couldnt find anything related to JDK installation option in that page but I was thinking to do it this way ... class java_rpm::install { $version = 'jdk-7u25-linux-x64.rpm' package { $version: provider => rpm, exec {"$version": install_options => ['-vh','--prefix=/operation/tools/jdk-1.7'], owner => operation, group => admin, mode => 0755, command => "rpm -ivh --prefix=/operation/tools/jdk-1.7 jdk-7u25-linux-x64. rpm" } source => "/etc/puppetlabs/puppet/environments/development/modules/java_rpm/files/jdk-7u25-linux-x64 } Thanks, On Thursday, June 26, 2014 1:30:31 PM UTC-4, Jim Ficarra wrote: Try the install_options attribute of the package type. You need to know what the install option is for the JDK itself to go to another folder, then use the install_options attribute in puppet. http://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options From: bobby38 Sent: Thursday, June 26, 2014 1:04 PM To: puppet...@googlegroups.com Subject: [Puppet Users] installation of package to a different folder Hello All, I am trying to install jdk package to a different folder rather than the default folder. i am trying to install for instance to /operation/tools/jdk-1.7 is there anyway to do this in puppet? Thanks and regards Babak -- 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...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fb472935-a473-42e3-bf73-fe9404da7088%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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/b4d8b1cc-d999-472f-a0fc-aa9c0137e23c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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/35C8105C6D464DEF99F0AF65385A8C48%40JimHPPavilionG6. For more options, visit https://groups.google.com/d/optout.