From b9334f9f47e8f758bc7c31c4d5656138adc14cfe Mon Sep 17 00:00:00 2001 From: Daniel Brachmann Date: Mon, 6 Feb 2017 23:48:06 +0100 Subject: [PATCH] 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 --- lib/ansible/parsing/mod_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index 6c47d28aa6f..2266d9e3359 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -287,7 +287,7 @@ class ModuleArgsParser: if item in module_loader or item in ['meta', 'include', 'include_role']: # finding more than one module name is a problem 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 thing = value action, args = self._normalize_parameters(thing, action=action, additional_args=additional_args)