From 567e989581223b89ed417da240bcf66f6077501f Mon Sep 17 00:00:00 2001 From: Jerry Chong Date: Wed, 18 Oct 2017 19:04:59 +0800 Subject: [PATCH] Fix exception upon display.warn() (#31876) Fixes #31875 --- lib/ansible/plugins/inventory/yaml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/inventory/yaml.py b/lib/ansible/plugins/inventory/yaml.py index 210c2908083..2605ba8a7f3 100644 --- a/lib/ansible/plugins/inventory/yaml.py +++ b/lib/ansible/plugins/inventory/yaml.py @@ -133,7 +133,7 @@ class InventoryModule(BaseFileInventoryPlugin): hosts, port = self._parse_host(host_pattern) self.populate_host_vars(hosts, group_data['hosts'][host_pattern] or {}, group, port) else: - self.display.warn('Skipping unexpected key (%s) in group (%s), only "vars", "children" and "hosts" are valid' % (key, group)) + self.display.warning('Skipping unexpected key (%s) in group (%s), only "vars", "children" and "hosts" are valid' % (key, group)) def _parse_host(self, host_pattern): '''