Hi I wanna to download a file and compare the md5 result of it with the md5 file downloaded, is there any way to do it? Is to verify that the file was downloaded correctly. I did it but it doesn''t work me exec {''download-FILE-tgz'': user => $user, cwd => $tmpdir, path => ''/usr/bin'', provider => ''shell'', command => "wget --no-proxy -q -O ${tgzfilename} ${packageurl}", onlyif => [ "test \"$(curl ${packageMd5})\" != \"$(md5sum ${tmpdir}/${tgzfilename} | awk {''print $1''})\" "] } -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
On Thu, May 2, 2013 at 6:31 AM, Roque Moyano <roque.ing@gmail.com> wrote:> I wanna to download a file and compare the md5 result of it with the md5 > file downloaded, is there any way to do it? Is to verify that the file was > downloaded correctly. I did it but it doesn''t work me > > exec {''download-FILE-tgz'': > user => $user, > cwd => $tmpdir, > path => ''/usr/bin'', > provider => ''shell'', > command => "wget --no-proxy -q -O ${tgzfilename} > ${packageurl}", > onlyif => [ "test \"$(curl ${packageMd5})\" !> \"$(md5sum ${tmpdir}/${tgzfilename} | awk {''print $1''})\" "] > }Take a look at Branan''s s3 file example: https://github.com/branan/puppet-module-s3file HTH, Nan -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
thanks!! the solution was a "grep" . Regards, El jueves, 2 de mayo de 2013 08:31:43 UTC-5, Roque Moyano escribió:> > Hi > > I wanna to download a file and compare the md5 result of it with the md5 > file downloaded, is there any way to do it? Is to verify that the file was > downloaded correctly. I did it but it doesn''t work me > > exec {''download-FILE-tgz'': > user => $user, > cwd => $tmpdir, > path => ''/usr/bin'', > provider => ''shell'', > command => "wget --no-proxy -q -O ${tgzfilename} > ${packageurl}", > onlyif => [ "test \"$(curl ${packageMd5})\" != > \"$(md5sum ${tmpdir}/${tgzfilename} | awk {''print $1''})\" "] > } > > > >-- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.