mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
refactoring async
- centralized skipping - also fixed module name broken by previous refactor - let action modules handle async processing - moved async into base action class's module exec - action plugins can now run final action as async - actually skip copy if base skips - fixed normal for new paths - ensure internal stat is never async - default poll to 10 as per docs - added hint for callback fix on poll - restructured late tmp, now a pipeline query - moving action handler to connection as networking does - fixed network assumption invocation is always passed - centralized key cleanup, normalized internal var - _supress_tmpdir_delete now in _ansible_xxx and gets removed from results - delay internal key removal till after we use em - nicer tmp removing, using existing methods - moved cleanup tmp flag to mking tmp func
This commit is contained in:
parent
22db51f15c
commit
c86a17b7a0
22 changed files with 254 additions and 371 deletions
|
@ -39,10 +39,8 @@ class ActionModule(ActionBase):
|
|||
result['msg'] = 'check mode not supported for this module'
|
||||
return result
|
||||
|
||||
remote_user = self._play_context.remote_user
|
||||
if not tmp:
|
||||
tmp = self._make_tmp_path(remote_user)
|
||||
self._cleanup_remote_tmp = True
|
||||
tmp = self._make_tmp_path()
|
||||
|
||||
creates = self._task.args.get('creates')
|
||||
if creates:
|
||||
|
@ -80,7 +78,7 @@ class ActionModule(ActionBase):
|
|||
self._transfer_file(source, tmp_src)
|
||||
|
||||
# set file permissions, more permissive when the copy is done as a different user
|
||||
self._fixup_perms2((tmp, tmp_src), remote_user, execute=True)
|
||||
self._fixup_perms2((tmp, tmp_src), execute=True)
|
||||
|
||||
# add preparation steps to one ssh roundtrip executing the script
|
||||
env_string = self._compute_environment_string()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue