Excluding specific VMs from Ansible Inventory: VMware -
i have configured group source "vmware vcenter" in ansible tower. per documentation, 1 can specify source variables
override variables found in vmware.ini , used inventory update script. detailed description of these variables view vmware.ini in ansible github repo.
an excerpt github file -
specify prefix filter. vms names beginning string not returned. prefix_filter = test_
in case, have @ least 3 prefixes need excluded. however, when try specifying prefix_filter 3 times, first 1 seems work. how can exclude vms start names other te?
answer comment:
i'd try use newer inventory script vmware_inventory.py jinja host_filters or patch vmware.py if vm.name.startswith( prefix_filter )
suits needs.
Comments
Post a Comment