On 05/20/2013 07:19 AM, Denmat wrote:
> Hmm, this?
>
>> exec { "/root/get_phantomjs.sh && rm -f /root/get_phantomjs.sh":
Yeah but the puppet resource 'file' will bring it back next run.
Assuming script is not containing anything of a security issue, you can
put it on a web server and do an exec like this:
exec { 'get_phantomjs':
command => 'wget
http://example.com/get_phantomjs.sh &&
./get_phantomjs.sh && rm -f get_phantomjs.sh',
}
Another solution is a custom fact, which will say if the
'/usr/local/bin/phantomjs' file exists, but that's an
over-engineering... building a dam when all you need is a bridge :D
--
Jakov Sosic
www.srce.unizg.hr