From fc0cad77541faedbc0bed5e9dbae716f058e713a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 11 Nov 2010 19:18:08 +0100 Subject: [PATCH] [molecule] add support for MOLECULE_TMPDIR environment variable (defaulting to /var/tmp), so that user can override it --- molecule/specs/plugins/image_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/specs/plugins/image_plugin.py b/molecule/specs/plugins/image_plugin.py index 2c26b6d..fa5ff34 100644 --- a/molecule/specs/plugins/image_plugin.py +++ b/molecule/specs/plugins/image_plugin.py @@ -70,7 +70,7 @@ class ImageHandler(GenericExecutionStep, BuiltinHandlerMixin): return sts try: self._tmp_loop_device_fd, self.tmp_loop_device_file = \ - tempfile.mkstemp(prefix = "molecule", dir = "/var/tmp") + tempfile.mkstemp(prefix = "molecule", dir = self._config['tmp_dir']) except (OSError, IOError,) as err: self._output.output("[%s|%s] %s: %s" % ( blue("ImageHandler"), darkred(self.spec_name),