From 86be0566333744c98c003a0910adda86faa60e14 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Fri, 16 Nov 2018 15:02:08 +0100 Subject: [PATCH] inventory: fix hostname check (#48789) --- lib/ansible/inventory/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/inventory/data.py b/lib/ansible/inventory/data.py index 5f3ca8993fb..9143c22410a 100644 --- a/lib/ansible/inventory/data.py +++ b/lib/ansible/inventory/data.py @@ -189,7 +189,7 @@ class InventoryData(object): ''' adds a host to inventory and possibly a group if not there already ''' if host: - if not isinstance(group, string_types): + if not isinstance(host, string_types): raise AnsibleError("Invalid host name supplied, expected a string but got %s for %s" % (type(host), host)) g = None if group: