Fix _AnsibleActionDone deprecation in patch plugin (#687)

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
This commit is contained in:
Lee Garrett
2026-05-13 13:20:49 +02:00
committed by GitHub
parent d88a3c833c
commit ca22c6fe26
2 changed files with 6 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
---
removed_features:
- patch - removed deprecated _AnsibleActionDone API (https://github.com/ansible-collections/ansible.posix/pull/687).

View File

@@ -20,7 +20,7 @@ __metaclass__ = type
import os import os
from ansible.errors import AnsibleError, AnsibleAction, _AnsibleActionDone, AnsibleActionFail from ansible.errors import AnsibleError, AnsibleAction, AnsibleActionFail
from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.common.text.converters import to_native
from ansible.module_utils.parsing.convert_bool import boolean from ansible.module_utils.parsing.convert_bool import boolean
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
@@ -46,7 +46,8 @@ class ActionModule(ActionBase):
elif remote_src: elif remote_src:
# everything is remote, so we just execute the module # everything is remote, so we just execute the module
# without changing any of the module arguments # without changing any of the module arguments
raise _AnsibleActionDone(result=self._execute_module(task_vars=task_vars)) result.update(self._execute_module(task_vars=task_vars))
return result
try: try:
src = self._find_needle('files', src) src = self._find_needle('files', src)