mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
now get_url defaults to module temp dir (#36218)
* now get_url and other modules default to module temp dir also fixed 'bare' exception * allow modules to work with older versions * updated docs per feedback
This commit is contained in:
@@ -159,7 +159,7 @@ from ansible.module_utils._text import to_bytes
|
||||
|
||||
def write_changes(module, contents, path):
|
||||
|
||||
tmpfd, tmpfile = tempfile.mkstemp()
|
||||
tmpfd, tmpfile = tempfile.mkstemp(dir=getattr(module, 'tmpdir', None))
|
||||
f = os.fdopen(tmpfd, 'wb')
|
||||
f.write(contents)
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user