fix action parsing to avoid conflicts agin
This commit is contained in:
parent
e4b0690ef3
commit
f25ec5adb3
1 changed files with 4 additions and 2 deletions
|
@ -264,6 +264,8 @@ class ModuleArgsParser:
|
|||
if 'action' in self._task_ds:
|
||||
# an old school 'action' statement
|
||||
thing = self._task_ds['action']
|
||||
action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)
|
||||
|
||||
|
||||
# local_action
|
||||
if 'local_action' in self._task_ds:
|
||||
|
@ -272,6 +274,7 @@ class ModuleArgsParser:
|
|||
raise AnsibleParserError("action and local_action are mutually exclusive", obj=self._task_ds)
|
||||
thing = self._task_ds.get('local_action', '')
|
||||
delegate_to = 'localhost'
|
||||
action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)
|
||||
|
||||
# module: <stuff> is the more new-style invocation
|
||||
|
||||
|
@ -283,9 +286,8 @@ class ModuleArgsParser:
|
|||
raise AnsibleParserError("conflicting action statements", obj=self._task_ds)
|
||||
action = item
|
||||
thing = value
|
||||
#TODO: find out if we should break here? Currently last matching action, break would make it first one
|
||||
action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)
|
||||
|
||||
action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)
|
||||
|
||||
# if we didn't see any module in the task at all, it's not a task really
|
||||
if action is None:
|
||||
|
|
Loading…
Reference in a new issue