diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index a4704bd8cc..dbe85b0bad 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -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: 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: