gather_facts: clean up tmp files upon completion (#57845)

Fixes #57248
This commit is contained in:
Martin Krizek 2019-06-14 18:55:23 +02:00 committed by Brian Coca
parent 3fb4c91d4c
commit e9c83b7a17
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- gather_facts - Clean up tmp files upon completion (https://github.com/ansible/ansible/issues/57248)

View file

@ -74,6 +74,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 = {}