Hi,

I've been using the excellent -
http://reductivelabs.com/trac/puppet/wiki/Recipes/AmazonWebService s3get
recipe for a while.

This allows me to call s3get on a file in a bucket from Amazon S3.  The
problem I have is that I can't see a way for an exec or package type to wait
(require) while the download is completed so I can complete tasks within one
poll.

The s3get define basically calls an exec, is it possible to have a before in
this exec that takes a parameter? i.e.
s3get { "ant/$antdist":
  cwd     => "/tmp",
  name    => "$antdist",
  expires => "90",
  bucket  => "talis-distros",
  before => "install_this",
}

define s3get ($bucket=$DEFAULTS3BUCKET, $cwd="/tmp", $expires=30,
$before="null") {
  exec { "s3get-$name" :
    cwd     => $cwd,
    creates => "$cwd/$name",
    command => s3getcurl($bucket, $title, $name, $expires),
    before => Exec["$before"],
    path    => ["/usr/bin", "/usr/sbin"],
  }
}

I've only just thought of that before hack hence why I haven't tried it
yet.  Anyone else had a similar problem/solution?

Thanks,

Matt

--~--~---------~--~----~------------~-------~--~----~
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