From f25ec5adb3bb00f2afebc8cc6ed87c23af4b8bd0 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 26 Aug 2016 16:15:55 -0400 Subject: [PATCH] fix action parsing to avoid conflicts agin --- lib/ansible/parsing/mod_args.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: