[chef] Temp directory for use with script resources?


Chronological Thread 
  • From: Michael Stillwell < >
  • To:
  • Subject: [chef] Temp directory for use with script resources?
  • Date: Tue, 28 Aug 2012 18:39:38 +0100

Quite a few of my more ad hoc recipes involve downloading a *.tar.gz
from some location (or via cookbook_file), and then performing some
random operation on it.  (Like uncompressing it and copying part of it
to another location, or installing via ./configure && make && make
install.)

Is there a recommended directory to perform these activities?
Sometimes I use /tmp, and sometimes Chef::Config[:file_cache_path],
but I'm not that happy with either...

Ideally, some directory would be provided that's guaranteed to exist,
be writable, and empty, and that is cleaned if the recipe completes
successfully, but left alone if not.



Michael



Archive powered by MHonArc 2.6.16.

§