gather_facts: clean up tmp files upon completion (#57845)
Fixes #57248
(cherry picked from commit e9c83b7a17
)
This commit is contained in:
parent
d46c187470
commit
188688cc6b
2 changed files with 4 additions and 0 deletions
2
changelogs/fragments/57248-gather_facts-cleanup-tmp.yaml
Normal file
2
changelogs/fragments/57248-gather_facts-cleanup-tmp.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- gather_facts - Clean up tmp files upon completion (https://github.com/ansible/ansible/issues/57248)
|
|
@ -70,6 +70,8 @@ class ActionModule(ActionBase):
|
|||
skipped[fact_module] = res.get('msg')
|
||||
else:
|
||||
result = combine_vars(result, {'ansible_facts': res.get('ansible_facts', {})})
|
||||
|
||||
self._remove_tmp_path(self._connection._shell.tmpdir)
|
||||
else:
|
||||
# do it async
|
||||
jobs = {}
|
||||
|
|
Loading…
Reference in a new issue