no tmpdir to remove for old ansible versions in fetch command

This commit is contained in:
Steven Robertson 2020-05-15 14:55:48 -07:00
parent 74b7934e37
commit e632310fc4
1 changed files with 5 additions and 1 deletions

View File

@ -157,6 +157,10 @@ class ActionModule(ActionBase):
result.update(dict(changed=False, md5sum=local_md5, file=source, dest=dest, checksum=local_checksum)) result.update(dict(changed=False, md5sum=local_md5, file=source, dest=dest, checksum=local_checksum))
finally: finally:
try:
self._remove_tmp_path(self._connection._shell.tmpdir) self._remove_tmp_path(self._connection._shell.tmpdir)
except AttributeError:
# .tmpdir was added to ShellModule in v2.6.0, so old versions don't have it
pass
return result return result