From dd6f2e6bfa9d251db95db06fb174faf0e2ccb9e1 Mon Sep 17 00:00:00 2001 From: Veeti Paananen Date: Sun, 23 Feb 2014 18:06:46 +0200 Subject: [PATCH] Show the offending file name with the include + with_items error --- lib/ansible/playbook/play.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 93b95049987..626c7136a36 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -498,7 +498,11 @@ class Play(object): include_vars = {} for k in x: if k.startswith("with_"): - utils.deprecated("include + with_items is a removed deprecated feature", "1.5", removed=True) + if original_file: + offender = " (in %s)" % original_file + else: + offender = "" + utils.deprecated("include + with_items is a removed deprecated feature" + offender, "1.5", removed=True) elif k.startswith("when_"): utils.deprecated("\"when_:\" is a removed deprecated feature, use the simplified 'when:' conditional directly", None, removed=True) elif k == 'when':