Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate remote temp dir if it no longer exists #1062

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible_mitogen/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ def get_temp_dir(self):
return path

if self._temp_dir is None:
# Ensure that the temp directory is 'good' before we try to use it
ansible_mitogen.target.is_good_temp_dir(self.good_temp_dir)

self._temp_dir = tempfile.mkdtemp(
prefix='ansible_mitogen_runner_',
dir=self.good_temp_dir,
Expand Down
5 changes: 2 additions & 3 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ To avail of fixes in an unreleased version, please download a ZIP file

Unreleased
----------

* :gh:issue:`1061` Fix recreating temp directory if it has been removed mid-play
* :gh:issue:`952` Fix Ansible `--ask-become-pass`, add test coverage


v0.3.7 (2024-04-08)
-------------------

Expand Down Expand Up @@ -59,7 +58,7 @@ v0.3.4 (2023-07-02)

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