> It would be neat if puppet could use tar.gz's as a source, instead of > just bare directory trees. So I've lodged a feature request: > https://projects.puppetlabs.com/issues/5786 > > Many of my manifests for applications need to cover the following > process: 1. Download .tar.gz to host > 2. Expand .tar.gz > 3. Whatever install process is required > > The best option is to build a Debian package or RPM. If you must build from source on each agent, I've had good success with something like this:
file { "/usr/local/sbin/install-thing": content => template("install-thing"), group => root, mode => 0755, owner => root, } exec { "/usr/local/sbin/install-thing": cwd => "/root", refreshonly => true, subscribe => File["/usr/local/sbin/install-thing"], timeout => "-1", } If you use the pattern frequently, define a type that takes care of the boilerplate so you can just do: sourceinstall { "thing": script => template("install-thing") } Your install-thing program may look something like this: VERSION=0.0.0 TMPDIR="$(mktemp -d)" cd "$TMPDIR" trap "cd / && rm -rf \"$TMPDIR\"" EXIT wget "http://thing-server/thing-$VERSION.tar.gz" tar xf "thing-$VERSION.tar.gz" cd "thing-$VERSION" ./configure make make install -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.