VMWare collection ready but waiting for release

turn off use of VMWare inventory plugin for now

Attempt to roll back general migration to Ansible 2.8
  failed, kept at 2.9 because of compatibility
This commit is contained in:
AlanCoding
2020-04-21 23:00:15 -04:00
parent 68f5482c42
commit 8c657e210c
2 changed files with 22 additions and 15 deletions

View File

@@ -2251,7 +2251,7 @@ class gce(PluginFileInjector):
class vmware(PluginFileInjector): class vmware(PluginFileInjector):
plugin_name = 'vmware_vm_inventory' plugin_name = 'vmware_vm_inventory'
initial_version = '2.9' # Only tested with collection version # initial_version = '2.9' # Ready 4/22/2020, waiting for release
ini_env_reference = 'VMWARE_INI_PATH' ini_env_reference = 'VMWARE_INI_PATH'
base_injector = 'managed' base_injector = 'managed'
namespace = 'community' namespace = 'community'
@@ -2271,23 +2271,23 @@ class vmware(PluginFileInjector):
"ansible_ssh_host", "ansible_ssh_host",
"ansible_host", "ansible_host",
"ansible_uuid", "ansible_uuid",
"availableField", # optional? "availableField",
"configIssue", # optional? "configIssue",
"configStatus", # optional? "configStatus",
"customValue", # optional? "customValue", # optional
"datastore", "datastore",
"effectiveRole", # optional? "effectiveRole",
"guestHeartbeatStatus", # optonal? "guestHeartbeatStatus", # optonal
"layout", # optional? "layout", # optional
"layoutEx", # optional? "layoutEx", # optional
"name", "name",
"network", "network",
"overallStatus", # optional? "overallStatus",
"parentVApp", # optional? "parentVApp", # optional
"permission", "permission",
"recentTask", # optional? "recentTask",
"resourcePool", "resourcePool",
"rootSnapshot", # optional? "rootSnapshot",
"snapshot", # optional "snapshot", # optional
"tag", "tag",
"triggeredAlarmState", "triggeredAlarmState",
@@ -2302,12 +2302,15 @@ class vmware(PluginFileInjector):
"summary", # repeat of other properties "summary", # repeat of other properties
] ]
ret['properties'] = UPPERCASE_PROPS + NESTED_PROPS ret['properties'] = UPPERCASE_PROPS + NESTED_PROPS
ret['compose'] = {} ret['compose'] = {'ansible_host': 'guest.ipAddress'} # default value
ret['compose']['ansible_ssh_host'] = ret['compose']['ansible_host']
# the ansible_uuid was unique every host, every import, from the script
ret['compose']['ansible_uuid'] = '99999999 | random | to_uuid'
for prop in UPPERCASE_PROPS: for prop in UPPERCASE_PROPS:
if prop == prop.lower(): if prop == prop.lower():
continue continue
ret['compose'][prop.lower()] = prop ret['compose'][prop.lower()] = prop
# ret['with_nested_properties'] = True # only dacrystal/topic/vmware-inventory-plugin-enhancements ret['with_nested_properties'] = True
# ret['property_name_format'] = 'lower_case' # only dacrystal/topic/vmware-inventory-plugin-property-format # ret['property_name_format'] = 'lower_case' # only dacrystal/topic/vmware-inventory-plugin-property-format
# process custom options # process custom options

View File

@@ -1,4 +1,7 @@
compose: compose:
ansible_host: guest.ipAddress
ansible_ssh_host: guest.ipAddress
ansible_uuid: 99999999 | random | to_uuid
availablefield: availableField availablefield: availableField
configissue: configIssue configissue: configIssue
configstatus: configStatus configstatus: configStatus
@@ -53,3 +56,4 @@ properties:
- storage - storage
- summary - summary
strict: false strict: false
with_nested_properties: true