Jay Benner
2014-Feb-12 22:37 UTC
[Puppet Users] moving from previous manual install to puppet/chocolatey
I have a bunch of windows servers with NewRelic installed on them and I want to start managing those installs with Puppet. Seemed like the thing to do would be to have chocolatey uninstall what is there and reinstall within the framework of chocolatey so that I get addressable version information and the like. I created the following chocolatey package and it works fine when run from the command line using cinst: any existing version is removed and the new version, managed by chocolatey, gets put in its place. However, when I run it from Puppet, it does the uninstall ok, but the install never happens, even though chocolatey seems to think that the package is installed. stop-service "LiveVault Backup Service" $app = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -match "New Relic Server Monitor" } $app.Uninstall() $licensekey = "XXXXXXXXXXXXXX" $packageName = 'NewRelic_ServerMonitor' $installerType = 'MSI' $url = 'http://download.newrelic.com/windows_server_monitor/release/NewRelicServerMonitor_x86_2.0.0.198.msi' $url64 = 'http://download.newrelic.com/windows_server_monitor/release/NewRelicServerMonitor_x64_2.0.0.198.msi' $validExitCodes = @(0) $silentArgs = "/L*v install_Agent.log /qn NR_LICENSE_KEY=`"$licensekey`"" Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCodes start-service "LiveVault Backup Service" Start-service "New Relic Server Monitor" -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/56fe586f-6c6e-49fb-a432-3a814ac3e65e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.