Commit 7f31fb63 authored by Alberts S's avatar Alberts S
Browse files

Fixup Inventory host matching

parent dbeb8310
......@@ -15,8 +15,8 @@ class Inventory(CapybaraNetty):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def is_matched_host(self, hostname: str):
if not self.inventory_match_hosts:
return False
if not self.inventory_match_hosts or len(self.inventory_match_hosts) < 1:
return True
else:
for node_filter in self.inventory_match_hosts:
if hostname.startswith(node_filter):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment