diff --git a/molecule/handlers.py b/molecule/handlers.py index 2586cae..a3b1b51 100644 --- a/molecule/handlers.py +++ b/molecule/handlers.py @@ -209,6 +209,11 @@ class ChrootHandler(GenericHandlerInterface): if not dest_exec.startswith("/"): dest_exec = "/%s" % (dest_exec,) rc = molecule.utils.exec_chroot_cmd([dest_exec], self.dest_dir, self.metadata.get('prechroot',[])) + try: + shutil.rmtree(tmp_dir,True) + os.rmdir(tmp_dir) + except OSError: + pass if rc != 0: self.Output.updateProgress("[%s|%s] %s: %s" % ( blue("ChrootHandler"),darkred(self.spec_name),