1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

improve error message on conflicting actions. Fixes #21057 (#21059)

* this fixes #21057

outputs the conflicting action statements.

* reverting to old  % syntax for python 2.6 compatibility
This commit is contained in:
Daniel Brachmann 2017-02-06 23:48:06 +01:00 committed by John R Barker
parent c6a5d9c8bf
commit b9334f9f47

View file

@ -287,7 +287,7 @@ class ModuleArgsParser:
if item in module_loader or item in ['meta', 'include', 'include_role']: if item in module_loader or item in ['meta', 'include', 'include_role']:
# finding more than one module name is a problem # finding more than one module name is a problem
if action is not None: if action is not None:
raise AnsibleParserError("conflicting action statements", obj=self._task_ds) raise AnsibleParserError("conflicting action statements: %s, %s" % (action, item), obj=self._task_ds)
action = item action = item
thing = value thing = value
action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args) action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)