Did you have the package in C:\chocolatey\lib already? It will not attempt
to install if it finds a package with the same name

Also you may want to switch to ensure => latest.


On Thu, Feb 13, 2014 at 12:22 PM, Jay Benner <longri...@gmail.com> wrote:

> The results of the test run:
> http://pastebin.com/00msu7VB
>
> My manifest:
> # Class: newrelic_server_monitor
> #
> # This module manages newrelic_server_monitor
>
> class newrelic_server_monitor {
>
>   #check installed version and remove if it is older than 2.0.0.198
>   case
>
> $pkg = 'NewRelic_Servermonitor'
>
>       package { $pkg:
>         ensure          => installed,
>         provider        => 'chocolatey',
>         source  =>  '\\myfileserver\everyone\devops\chocolatey\packages',
>
>       }
> }
>
>
>
> On Thursday, February 13, 2014 9:18:59 AM UTC-8, Rob Reynolds wrote:
>
>> Can you share your manifest?
>>
>> Also would you run puppet agent --test --verbose --debug and post that
>> output (preferably in a gist / pastebin and then link that here)? Remove
>> the sensitive information such as the license.
>>
>>
>> On Thu, Feb 13, 2014 at 10:55 AM, Jay Benner <long...@gmail.com> wrote:
>>
>>> I got it from the forge.
>>> I don't know how to tell what version of chocolatey I have.
>>> Name of the package is "newrelic_servermonitor".
>>> The package does appear in /lib, even though the software did not
>>> install.
>>> UAC is off.
>>> Thanks for the response, I posted in Puppet because it seems to work
>>> perfectly when I run chocolatey from the command prompt.  I didn't realize
>>> that the chocolatey group supported the puppet provider as well; I'll note
>>> it in the future.
>>>
>>>
>>> On Wednesday, February 12, 2014 2:37:49 PM UTC-8, Jay Benner wrote:
>>>>
>>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/puppet-users/2c7df372-bb8b-4841-b986-22a1fb9efa08%
>>> 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
>>
>  --
> 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/684233cb-fc24-4f38-94bb-e0029bc3f807%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

-- 
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/CAMJiBK7xkG7eV46UiM0xTGK7OpNXtGXC0BwnagCFq6KauscJSg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to