Thanks Jeff. Just to confirm on terminologies, is push different from copy ? I want to copy file from windows D:/puppet/Anshita.txt to Unix in /root/Harshita. My basic requirement is to copy the war and tar files from windows to Unix when the build is over in windows. Then when the tar is copied to Unix location I want to untar it.
Since I m new to puppet I was experimenting on file transfer . Once I m successful in my experiment I would explore more for automation. Kindly suggest. Many thanks Harshita Regards Harshita On 20 Dec 2013 20:28, "Jeff Bachtel" <jbach...@bericotechnologies.com> wrote: > (adding puppet-users@ back in case others have better information on > handling filebuckets) > > On 12/20/2013 12:53 AM, Harshita Sinha wrote: > > Dear Jeff, > > Thanks for your guidance. > Basically I want to achieve sending files from Windows to unix. > > > I missed "push the file from windows to unix" in your original email, my > apologies. > > In that case, I propose the following (reference > http://docs.puppetlabs.com/references/latest/type.html#filebucket) > > ## site.pp > > filebucket { 'main': > path => false, > } > > File { backup => 'main', } > > node default { > file { 'D:\Puppet\Anshita.txt': > ensure => 'file', > } > } > > > This should back up Anshita.txt IF there is a change. I don't know how it > will work when the content isn't specified, but if filebucket will work for > you at all in this, that will work. Now here is the problem: filebucket, > being designed for large deployments, does not simply store the file in a > directory on puppetmaster where it's easy to get to, but in > /var/lib/puppet/bucket by md5 sum. To retrieve the file you will Instead > need to use the puppet filebucket command as > > find /var/lib/puppet/bucket/ -name paths | xargs grep Anshita.txt > to get the md5sum of the file, then > puppet filebucket restore /tmp/Anshita.txt (md5sum from previous) > > Things to note: > You cannot specify *path* for the remote filebucket. This is an explicit > limitation. > You must still have a *file* resource in the node definition for your > Windows agent, or Puppet will be unaware of the file to back it up. > You do not need to specify your server in the filebucket statement unless > it is different than your puppetmaster. > My command for finding the md5 of the file (*find...xargs*) is for Puppet > community edition, not Puppet Enterprise. > > Jeff > > -- 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/CAP%3D1m3aTNKNOZEkP3_tDMO_xQLht0DqUqRG%2B17bTcJ8u06n0MQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.