Debian Codegraph @

test/integration/targets/until/action_plugins/shell_no_failed.py

raw
1 # Copyright: (c) 2017, Ansible Project
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3
4 from __future__ import annotations
5
6 from ansible.plugins.action import ActionBase
7
8
9 class ActionModule(ActionBase):
10
11 def run(self, tmp=None, task_vars=None):
12 del tmp # tmp no longer has any effect
13
14 try:
15 self._task.args['_raw_params'] = self._task.args.pop('cmd')
16 except KeyError:
17 pass
18 shell_action = self._shared_loader_obj.action_loader.get('ansible.legacy.shell',
19 task=self._task,
20 connection=self._connection,
21 play_context=self._play_context,
22 loader=self._loader,
23 templar=self._templar,
24 shared_loader_obj=self._shared_loader_obj)
25 result = shell_action.run(task_vars=task_vars)
26 result.pop('failed', None)
27 return result