Repository: ansible-collections/community.vmware

Issue:
vmware_cluster_info returns enabled_vsan as a list and not string
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
<!--- Explain the problem briefly below -->
Previous to 1.8.0 the module vmware_cluster_info always returned false even when it was enabled.  In 1.8.0 this was fixed to accurately reflect the vSAN status, but now the value is a list with true in it, rather than just a string, like enable_ha and enabled_drs returns currently.  When checking this value you have to specify 
when: enabled_vsan[0] == true
rather than 
when: enabled_vsan == true

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
vmware_cluster_info

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.9.19
  config file = /home/postj1/AWX/ansible.cfg
  configured module search path = ['/home/postj1/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Aug 18 2020, 08:33:21) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
ANSIBLE_SSH_ARGS(/home/username/AWX/ansible.cfg) = -C -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
COLLECTIONS_PATHS(/home/username/AWX/ansible.cfg) = ['/home/username/AWX/collections']
DEFAULT_FILTER_PLUGIN_PATH(/home/username/AWX/ansible.cfg) = ['/home/username/AWX/custom_filters']
DEFAULT_ROLES_PATH(/home/username/AWX/ansible.cfg) = ['/home/username/AWX/roles']
```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->


##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Run vmware_cluster_info against a cluster that has vSAN enabled and debug the registered output or run another task using 
when: enabled_vsan == true
to only run the task on vSAN clusters

<!--- Paste example playbooks or commands between quotes below -->
```yaml

```

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
```
            "enable_ha": true,
            "enabled_drs": true,
            "enabled_vsan": true,
```
##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes -->
```paste below
            "enable_ha": true,
            "enabled_drs": true,
            "enabled_vsan": [
                true
            ],
```



Discussion:

Resolving patch:
diff --git a/plugins/modules/vmware_cluster_info.py b/plugins/modules/vmware_cluster_info.py
--- a/plugins/modules/vmware_cluster_info.py
+++ b/plugins/modules/vmware_cluster_info.py
@@ -282,8 +282,8 @@ def gather_cluster_info(self):
                 # VSAN
                 if hasattr(cluster.configurationEx, 'vsanConfigInfo'):
                     vsan_config = cluster.configurationEx.vsanConfigInfo
-                    enabled_vsan = vsan_config.enabled,
-                    vsan_auto_claim_storage = vsan_config.defaultConfig.autoClaimStorage,
+                    enabled_vsan = vsan_config.enabled
+                    vsan_auto_claim_storage = vsan_config.defaultConfig.autoClaimStorage
 
                 tag_info = []
                 if self.params.get('show_tag'):


Test patch: