On Mon, Sep 24, 2012 at 5:22 PM, jbrown <[email protected]> wrote: > Hello, > > I'm trying to install a few MSI packages on Windows, and I'm having trouble > specifying options. > > Here is what I want to execute > > C:\packages\my_problematic_package.msi \quiet \passive > > As you can see, I'm trying to specify two arguments to the package, but I > can't figure out how to use the Puppet package resource to accomplish this. > Install_options being a hash is causing me confusion. > > Here's my attempt at a resource definition: > > package { "my_problematic_package.msi": > ensure => installed, > provider => 'msi', > source => "C:/packages/my_problematic_package.msi", > install_options => '/quiet /passive', > > # Previous try as a hash > # install_options => { " " => '/quiet /passive' }, > > require => File["C:/packages/my_problematic_package.msi"], > } > > When I run this on the a Windows host, I get a help popup (same thing > without any install_options defined) that is the same as running '\?'. Then, > I get an error that says "the semaphore cannot be set again." Thinking that > Puppet may think the package is installed, I re-ran it with "ensure => > absent," which succeeded, but subsequent install attempts failed with the > same error. > > The MSI is obviously executing because the help popup appears. It just seems > to be running with the incorrect options. > > Could anyone help?
Looking at the code it's expecting an array (of string or hash). I'm not sure why the docs on the website shows just a hash, since the type is not doing munging. install_options => ['\quiet', '\passive'], Might be a recent change, anyhow take a look at the inline documentation in the source code: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/package.rb#L301 Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
