mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
VMware: change default host_filter to gueststate (#32839)
This fix changes default value of host_filter in vmware_inventory.py and vmware_inventory.ini to 'runtime.powerstate' from 'guest.gueststate'. This change is added as 'guest.gueststate' requires vmware tools to be installed on given VM, which may not be the case everytime. Fixes: #25086 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
a6feadbba3
commit
d372cea2f8
2 changed files with 7 additions and 3 deletions
|
@ -254,7 +254,7 @@ class VMWareInventory(object):
|
|||
'resourceconfig',
|
||||
'alias_pattern': '{{ config.name + "_" + config.uuid }}',
|
||||
'host_pattern': '{{ guest.ipaddress }}',
|
||||
'host_filters': '{{ guest.gueststate == "running" }}',
|
||||
'host_filters': '{{ runtime.powerstate == "poweredOn" }}',
|
||||
'groupby_patterns': '{{ guest.guestid }},{{ "templates" if config.template else "guests"}}',
|
||||
'lower_var_keys': True,
|
||||
'custom_field_group_prefix': 'vmware_tag_',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue