Hi Rob, I did not see that! I will try it this way. Puppet version is 3.4 Open Source.
The other question I have is where can I get a list of install_option flags for MSI packages? There are some examples such as INSTALLDIR and ALLUSERS but this is not a complete list. Thanks again Alex On Thursday, January 23, 2014 8:34:08 PM UTC, Rob Reynolds wrote: > > Hello Alex, > > On Thu, Jan 23, 2014 at 12:01 PM, <pskov...@gmail.com <javascript:>>wrote: > >> Hi, >> >> I would like to install Apache silently on Windows servers using Puppet. >> Here's my class: >> >> class base_apache { >> >> case $operatingsystem { >> windows: { >> file { 'apache_installer_package': >> path => 'D:/Downloads/Puppet/', >> ensure => directory, >> source => >> 'puppet:///files/Apache-Installers/', >> recurse => true, >> purge => false, >> source_permissions => ignore, >> replace => no, >> before => Package['apache >> 2.2.25'] >> } >> >> package { 'apache 2.2.25': >> ensure => installed, >> source => >> 'D:\\Downloads\\Puppet\\httpd-2.2.25-win32-x86-openssl-0.9.8y.msi', >> install_options => {'INSTALLDIR' => >> 'D:\Apache2.2'}, >> } >> } >> } >> } >> >> It works, in that it installs it. However, it doesn't create Apache >> service and it doesn't seem to know if Apache is already installed as it >> seems to "create" it on every agent run: >> >> C:\>puppet agent -t >> Info: Retrieving plugin >> Info: Caching catalog for localhost >> Info: Applying configuration version '1390499627' >> Notice: /Stage[main]/Base_apache/Package[apache 2.2.25]/ensure: created >> Notice: Finished catalog run in 6.17 seconds >> >> Any ideas? >> > > > What version of puppet? Second, have you looked over > http://docs.puppetlabs.com/windows/writing.html#packagepackage > > Specifically this: > > The title (or name) of the package must match the value of the package’s > DisplayName property in the registry, which is also the value displayed > in the “Add/Remove Programs” or “Programs and Features” control panel. If > the provided name and installed name don’t match, Puppet will believe the > package is not installed and try to install it again. > > > >> >> Thanks >> Alex >> >> -- >> 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 <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/65b79434-4cb8-4656-9a64-b80960af333a%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Rob Reynolds > Developer, Puppet Labs > > Join us at PuppetConf 2014, September 23-24 in San Francisco - > http://bit.ly/pupconf14 > Register now and save 40%! Offer expires January 31st. > -- 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/904cd853-0e2c-4394-af20-0ae6c7f7a36d%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.