diff --git a/kolla_ansible/kolla_address.py b/kolla_ansible/kolla_address.py index 12dff1ad1e..4538e75a2c 100644 --- a/kolla_ansible/kolla_address.py +++ b/kolla_ansible/kolla_address.py @@ -48,7 +48,7 @@ def kolla_address(context, network_name, hostname=None): raise FilterError("'inventory_hostname' variable is unavailable") hostvars = context.get('hostvars') - if isinstance(hostvars, Undefined): + if hostvars is None or isinstance(hostvars, Undefined): raise FilterError("'hostvars' variable is unavailable") host = hostvars.get(hostname)