diff --git a/module/sources/vmware/connection.py b/module/sources/vmware/connection.py index 537444a..7815856 100644 --- a/module/sources/vmware/connection.py +++ b/module/sources/vmware/connection.py @@ -1466,7 +1466,7 @@ def add_cluster(self, obj): # check for full name and then for cluster name only if self.passes_filter(full_cluster_name, self.cluster_include_filter, self.cluster_exclude_filter) is False \ - and self.passes_filter(name, self.cluster_include_filter, self.cluster_exclude_filter) is False: + or self.passes_filter(name, self.cluster_include_filter, self.cluster_exclude_filter) is False: return site_name = self.get_site_name(NBCluster, full_cluster_name) diff --git a/settings-example.ini b/settings-example.ini index bba3a23..806950b 100644 --- a/settings-example.ini +++ b/settings-example.ini @@ -144,6 +144,9 @@ permitted_subnets = 172.16.0.0/12, 10.0.0.0/8, 192.168.0.0/16, fd00::/8 # Include filters are checked first and exclude filters after. An object name has to # pass both filters to be synced to NetBox. If a filter is unset it will be ignored. # Filters are all treated as regex expressions! +# If more then one expression should match a '|' needs to be used +# Example: (exclude all VMs with "replica" in their name and all VMs starting with "backup") +# vm_exclude_filter = *.replica.*|^backup.* # If a cluster is excluded from sync then ALL VMs and HOSTS inside the cluster will # be ignored!