|
|
@ -233,9 +233,10 @@ class ModuleArgsParser:
|
|
|
|
task, dealing with all sorts of levels of fuzziness.
|
|
|
|
task, dealing with all sorts of levels of fuzziness.
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
thing = None
|
|
|
|
thing = None
|
|
|
|
|
|
|
|
|
|
|
|
action = None
|
|
|
|
action = None
|
|
|
|
connection = self._task_ds.get('connection', None)
|
|
|
|
delegate_to = self._task_ds.get('delegate_to', None)
|
|
|
|
args = dict()
|
|
|
|
args = dict()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -255,12 +256,11 @@ class ModuleArgsParser:
|
|
|
|
# local_action
|
|
|
|
# local_action
|
|
|
|
local_action = False
|
|
|
|
local_action = False
|
|
|
|
if 'local_action' in self._task_ds:
|
|
|
|
if 'local_action' in self._task_ds:
|
|
|
|
# local_action is similar but also implies a connection='local'
|
|
|
|
# local_action is similar but also implies a delegate_to
|
|
|
|
if action is not None:
|
|
|
|
if action is not None:
|
|
|
|
raise AnsibleParserError("action and local_action are mutually exclusive", obj=self._task_ds)
|
|
|
|
raise AnsibleParserError("action and local_action are mutually exclusive", obj=self._task_ds)
|
|
|
|
thing = self._task_ds.get('local_action', '')
|
|
|
|
thing = self._task_ds.get('local_action', '')
|
|
|
|
connection = 'local'
|
|
|
|
delegate_to = 'localhost'
|
|
|
|
local_action = True
|
|
|
|
|
|
|
|
action, args = self._normalize_parameters(thing, additional_args=additional_args)
|
|
|
|
action, args = self._normalize_parameters(thing, additional_args=additional_args)
|
|
|
|
|
|
|
|
|
|
|
|
# walk the input dictionary to see we recognize a module name
|
|
|
|
# walk the input dictionary to see we recognize a module name
|
|
|
@ -294,8 +294,4 @@ class ModuleArgsParser:
|
|
|
|
# shell modules require special handling
|
|
|
|
# shell modules require special handling
|
|
|
|
(action, args) = self._handle_shell_weirdness(action, args)
|
|
|
|
(action, args) = self._handle_shell_weirdness(action, args)
|
|
|
|
|
|
|
|
|
|
|
|
# now add the local action flag to the args, if it was set
|
|
|
|
return (action, args, delegate_to)
|
|
|
|
if local_action:
|
|
|
|
|
|
|
|
args['_local_action'] = local_action
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (action, args, connection)
|
|
|
|
|
|
|
|