Install MSI packages

132 views
Skip to first unread message

pskov...@gmail.com

unread,
Jan 23, 2014, 1:01:19 PM1/23/14
to puppet...@googlegroups.com
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?

Thanks
Alex

Rob Reynolds

unread,
Jan 23, 2014, 3:34:08 PM1/23/14
to puppet...@googlegroups.com
Hello Alex,

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.
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 2014September 23-24 in San Francisco - http://bit.ly/pupconf14
Register now and save 40%! Offer expires January 31st.

pskov...@gmail.com

unread,
Jan 24, 2014, 3:35:20 AM1/24/14
to puppet...@googlegroups.com
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

Rob Reynolds

unread,
Jan 24, 2014, 1:09:30 PM1/24/14
to puppet...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages