Skip to content

Commit cfb836c

Browse files
committed
recreate temp dir if it no longer exists
1 parent c4cf0d5 commit cfb836c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ansible_mitogen/runner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ def get_temp_dir(self):
358358
return path
359359

360360
if self._temp_dir is None:
361+
# Ensure that the temp directory is 'good' before we try to use it
362+
ansible_mitogen.target.is_good_temp_dir(self.good_temp_dir)
363+
361364
self._temp_dir = tempfile.mkdtemp(
362365
prefix='ansible_mitogen_runner_',
363366
dir=self.good_temp_dir,

docs/changelog.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ To avail of fixes in an unreleased version, please download a ZIP file
2020

2121
Unreleased
2222
----------
23-
24-
23+
* :gh:issue:`1061` Fix recreating temp directory if it has been removed mid-play
2524

2625
v0.3.7 (2024-04-08)
2726
-------------------
@@ -58,7 +57,7 @@ v0.3.4 (2023-07-02)
5857

5958
* :gh:issue:`929` Support Ansible 6 and ansible-core 2.13
6059
* :gh:issue:`832` Fix runtime error when using the ansible.builtin.dnf module multiple times
61-
* :gh:issue:`925` :class:`ansible_mitogen.connection.Connection` no longer tries to close the
60+
* :gh:issue:`925` :class:`ansible_mitogen.connection.Connection` no longer tries to close the
6261
connection on destruction. This is expected to reduce cases of `mitogen.core.Error: An attempt
6362
was made to enqueue a message with a Broker that has already exitted`. However it may result in
6463
resource leaks.

0 commit comments

Comments
 (0)