From d7419b4dbc15c53317fe6490146bfd4906bc60d0 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 24 May 2018 15:56:46 +0200 Subject: [PATCH] Do not silently skip YAML groups (#40660) --- lib/ansible/plugins/inventory/yaml.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/plugins/inventory/yaml.py b/lib/ansible/plugins/inventory/yaml.py index 1e545f9bbd..d6e6d623ca 100644 --- a/lib/ansible/plugins/inventory/yaml.py +++ b/lib/ansible/plugins/inventory/yaml.py @@ -143,6 +143,9 @@ class InventoryModule(BaseFileInventoryPlugin): else: self.display.warning('Skipping unexpected key (%s) in group (%s), only "vars", "children" and "hosts" are valid' % (key, group)) + else: + self.display.warning("Skipping '%s' as this is not a valid group name" % group) + def _parse_host(self, host_pattern): ''' Each host key can be a pattern, try to process it and add variables as needed