Hi Bernard,

> On Thu, Jan 24, 2013 at 1:49 PM, GRANIER Bernard (MORPHO)
> <bernard.gran...@morpho.com> wrote:
>>
>> class install_java_win {
>> file {'jdk-6u18-windows-i586.exe':
>>     path=> "$c:/tmp/jdk-6u18-windows-i586.exe",
>>     ensure=> present,
>>     mode=> 0777,
>>     source =>
>> "puppet://${server}/modules/install_java_win/jdk-6u18-windows-i586.exe",
>> }
>>
>> exec {'java':
>>    creates => "c:/tmp/myfile2.txt",
>>    cwd => c:/tmp",
>>    path => "c:/tmp;${::path}",
>>    logoutput => true,
>>    command => 'cmd /c jdk-6u18-windows-i586.exe /s
>> INSTALLDIR=c:\\tools\\jdk1.6.0_18 /INSTALLDIRJAVADB=c:\\tools\\jdk1.6.0_18
>> /INSTALLDIRPUBJRE=c:\\tools\\jdk1.6.0_18',
>>       require => [ File['jdk-6u18-windows-i586.exe'] ],
>>       }
>> }

You should checkout the executable package provider in Puppet 3. See
https://groups.google.com/d/msg/puppet-users/cKQ8DAV6nlI/q_hkK2w8MNIJ

One gotcha to be aware of is that the name of the package in your
manifest must match the name displayed in Add/Remove Programs, e.g.
'Java(TM) 6 Update 18'

Josh

--
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to