mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 09:13:12 +00:00
@@ -21,6 +21,7 @@ import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError, AnsibleFileNotFound, AnsibleAction, AnsibleActionFail
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.parsing.convert_bool import boolean
|
||||
@@ -132,7 +133,7 @@ class ActionModule(ActionBase):
|
||||
new_task.args.pop('variable_end_string', None)
|
||||
new_task.args.pop('trim_blocks', None)
|
||||
try:
|
||||
tempdir = tempfile.mkdtemp()
|
||||
tempdir = tempfile.mkdtemp(dir=C.DEFAULT_LOCAL_TMP)
|
||||
result_file = os.path.join(tempdir, os.path.basename(source))
|
||||
with open(result_file, 'wb') as f:
|
||||
f.write(to_bytes(resultant, errors='surrogate_or_strict'))
|
||||
|
||||
Reference in New Issue
Block a user