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.

Reply via email to