From 7aa11c441d64eed0e53fb1390c4e09711a3539d5 Mon Sep 17 00:00:00 2001 From: Patrick Marques Date: Fri, 7 Dec 2018 15:18:25 +0000 Subject: [PATCH] Print hostname when fails to generate keyed groups (#49609) --- lib/ansible/plugins/inventory/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/inventory/__init__.py b/lib/ansible/plugins/inventory/__init__.py index a85f075b9af..e3cd33f2ae1 100644 --- a/lib/ansible/plugins/inventory/__init__.py +++ b/lib/ansible/plugins/inventory/__init__.py @@ -343,7 +343,7 @@ class Constructable(object): key = self._compose(keyed.get('key'), variables) except Exception as e: if strict: - raise AnsibleParserError("Could not generate group from %s entry: %s" % (keyed.get('key'), to_native(e))) + raise AnsibleParserError("Could not generate group for host %s from %s entry: %s" % (host, keyed.get('key'), to_native(e))) continue if key: