Hi Viktoriya,

On Mon, Jul 9, 2012 at 2:18 PM, Viktoriya Tochilnikova <vt...@yahoo.com> wrote:
> I have figured it out and got it to work - my executable is getting placed
> on win machine. Great thanks, Josh.
> How, I need to execute it. Here is my executable:
>
> exec { 'C:\Users\vita\Downloads\Wireshark-win32-1.8.0.exe':
>         creates => 'C:\Program Files\Wireshark\wireshark.exe'
>     }
>
> Is this correct?
>

Yes, looks good provided 'C:\Program Files\Wireshark\wireshark.exe' is
the correct path for the installed executable.

If you run into issues, try adding the `logoutput => true` parameter
to the exec resource.

> Viktoriya
>
>
> ________________________________
> From: Viktoriya Tochilnikova <vt...@yahoo.com>
> To: "puppet-users@googlegroups.com" <puppet-users@googlegroups.com>
> Cc: Josh Cooper <j...@puppetlabs.com>
> Sent: Monday, July 9, 2012 1:56 PM
>
> Subject: Re: [Puppet Users] manifest for files executable on windows
>
> Josh,
> This is what I got this time, after fixing the source path. Pls help. Great
> Thanks!
> C:\Program Files\Puppet Labs\Puppet Enterprise\bin>puppet agent --test
> --server
> qalab2.pertino.com
> info: Caching catalog for homebasic32.pertino.com
> info: Applying configuration version '1341867021'
> err: /Stage[main]//File[C:\Users\vita\Downloads\Wireshark-win32-1.8.0.exe]:
> Coul
> d not evaluate: Could not retrieve information from environment production
> sourc
> e(s) puppet:///modules/wsh/Wireshark-win32-1.8.0.exe at
> /etc/puppet/manifests/si
> te.pp:8
> notice: Finished catalog run in 0.20 seconds
>>
>
> Viktoriya
>
>
> From: Josh Cooper <j...@puppetlabs.com>
> To: Viktoriya Tochilnikova <vt...@yahoo.com>
> Cc: "puppet-users@googlegroups.com" <puppet-users@googlegroups.com>
> Sent: Monday, July 9, 2012 1:44 PM
> Subject: Re: [Puppet Users] manifest for files executable on windows
>
> Hi Viktoriya,
>
> On Mon, Jul 9, 2012 at 1:18 PM, Viktoriya Tochilnikova <vt...@yahoo.com>
> wrote:
>>
>> Here is my file:
>>
>> file { 'C:\Users\vita\Downloads\Wireshark-win32-1.8.0.exe':
>>      ensure => present,
>>      source => 'puppet:///puppet/modules/wsh/Wireshark-win32-1.8.0.exe',
>
> The source needs to be 'puppet:///modules/wsh/Wireshark-win32-1.8.0.exe'
>
>>    }
>>
>>
>> Viktoriya
>>
>>
>> ________________________________
>> From: Josh Cooper <j...@puppetlabs.com>
>> To: puppet-users@googlegroups.com
>> Sent: Monday, July 9, 2012 12:27 PM
>> Subject: Re: [Puppet Users] manifest for files executable on windows
>>
>> Hi,
>>
>> On Mon, Jul 9, 2012 at 10:53 AM, vita <vt...@yahoo.com> wrote:
>>> Hello Puppet Users,
>>>
>>> I need a puppet master (Ubuntu) to push the executable files to the agent
>>> (windows 7) and install those executables
>>>
>>> I believe the manifest file should be set up to push such config to the
>>> windows agent. I came up with something like this:
>>>
>>> class wireshark {
>>>    exec { 'wireshark':
>>>      command => 'C:\Users\vita\Downloads\Wireshark-win32-1.8.0.exe,
>>
>> Need an ending quote above.
>>
>>>    }
>>> }
>>> node homebasic32.test.com {
>>>    include wireshark
>>> }
>>>
>>> According to my understanding, this manifest file will execute already
>>> existing Wireshark-win32-1.8.0.exe file on windows. I cannot figure out
>>> how
>>> to make the master to push this file to windows first.
>>>
>>> Please help!
>>>
>>> Great thanks!!!
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Puppet Users" group.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msg/puppet-users/-/C0mZoYGo8ucJ.
>>> To post to this group, send email to puppet-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> puppet-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/puppet-users?hl=en.
>>
>> You will want to declare a file resource whose source refers back to
>> your 'wireshark' module on your puppetmaster:
>>
>> file { 'C:\Users\vita\Downloads\Wireshark-win32-1.8.0.exe':
>>  ensure => present,
>>  source => 'puppet:///modules/wireshark/Wireshark-win32-1.8.0.exe',
>> }
>>
>> Then place the Wireshark executable on the puppetmaster, e.g.
>> /etc/puppetlabs/modules/wireshark/files/Wireshark-win32-1.8.0.exe,
>> with the appropriate executable mode, e.g. 0750.
>>
>> When the Puppet agent applies the catalog, it will download the file
>> if necessary, and then execute it. However, as currently written,
>> Puppet will execute the wireshark installer every time it runs. You
>> will need to use the `onlyif` or `creates` parameters for your exec
>> resource so that Puppet performs the exec if wireshark is not
>> installed.[1] For example, `creates => 'C:\Program Files
>> (x86)\Wireshark\wireshark.exe'`
>>
>> Finally, we are working on updating the package provider to support
>> non-MSI types, such as NullSoft that Wireshark uses.[2]
>>
>> Josh
>>
>> [1] http://docs.puppetlabs.com/references/stable/type.html#exec
>> [2] https://projects.puppetlabs.com/issues/11870
>>
>> --
>> Josh Cooper
>> Developer, Puppet Labs
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>>
>
> Josh
>
> --
> Josh Cooper
> Developer, Puppet Labs
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>
>
>
>



-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to