summaryrefslogtreecommitdiff
path: root/lib/chef/config.rb
diff options
context:
space:
mode:
authorSerdar Sutay <serdar@opscode.com>2014-11-14 12:35:05 -0800
committerSerdar Sutay <serdar@opscode.com>2014-11-14 12:35:05 -0800
commitf5ec7e9cc0e269eaac284d87f3c3b33a0cf68b6a (patch)
treed625255c4b47ed9c37740c478e3adccf71eb1c17 /lib/chef/config.rb
parent88a210b46a02aa82f8bf80fab7091b23da7720a3 (diff)
downloadchef-f5ec7e9cc0e269eaac284d87f3c3b33a0cf68b6a.tar.gz
Introduct :auto mode for :file_staging_uses_destdir which tries the dest_dir first and falls back to tmpdir when unsuccessful.
Diffstat (limited to 'lib/chef/config.rb')
-rw-r--r--lib/chef/config.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb
index d3871c38e8..877abcc2ba 100644
--- a/lib/chef/config.rb
+++ b/lib/chef/config.rb
@@ -560,10 +560,12 @@ class Chef
# used to update files.
default :file_atomic_update, true
- # If false file staging is will be done via tempfiles that are
- # created under ENV['TMP'] otherwise tempfiles will be created in
- # the directory that files are going to reside.
- default :file_staging_uses_destdir, true
+ # There are 3 possible values for this configuration setting.
+ # true => file staging is done in the destination directory
+ # false => file staging is done via tempfiles under ENV['TMP']
+ # :auto => file staging will try using ENV['TMP'] if possible and
+ # will fall back to destination directory if ENV['TMP'] is not usable.
+ default :file_staging_uses_destdir, :auto
# Exit if another run is in progress and the chef-client is unable to
# get the lock before time expires. If nil, no timeout is enforced. (Exits