1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

vmware_inventory.py: skip_keys can use a full key path (#20389)

use inkey attribute in _process_object_types recursive loop to generate key name in skip_keys directive.

This permit to ignore nested variables, for example summary.vm to optimize inventory collect
This commit is contained in:
Loïc Blot 2017-01-18 14:36:11 +01:00 committed by John R Barker
parent b8c1321635
commit a3321d1074

View file

@ -669,7 +669,7 @@ class VMWareInventory(object):
methods = dir(vobj) methods = dir(vobj)
methods = [str(x) for x in methods if not x.startswith('_')] methods = [str(x) for x in methods if not x.startswith('_')]
methods = [x for x in methods if x not in self.bad_types] methods = [x for x in methods if x not in self.bad_types]
methods = [x for x in methods if not x.lower() in self.skip_keys] methods = [x for x in methods if not inkey + '.' + x.lower() in self.skip_keys]
methods = sorted(methods) methods = sorted(methods)
for method in methods: for method in methods: