mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
adds feature to allow connection to set action plugin (#18762)
Connection plugin can define default action plugin to use by providing action_handler instance variable. This will override the default action plugin normal
This commit is contained in:
parent
0cef38cf02
commit
ad99d52679
2 changed files with 10 additions and 1 deletions
|
@ -762,7 +762,8 @@ class TaskExecutor:
|
|||
raise AnsibleError("async mode is not supported with the %s module" % self._task.action)
|
||||
handler_name = self._task.action
|
||||
elif self._task.async == 0:
|
||||
handler_name = 'normal'
|
||||
pc_conn = self._shared_loader_obj.connection_loader.get(self._play_context.connection, class_only=True)
|
||||
handler_name = getattr(pc_conn, 'action_handler', 'normal')
|
||||
else:
|
||||
handler_name = 'async'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue