Repository: ansible-collections/community.vmware

Issue:
vmware_datastore_cluster_manager is always changed in checkmode
##### SUMMARY
When running in check mode the module is always reporting changed even when it is not detecting any changes.

I had a look at the code and I think there is an if statement missing to set changed=true depending on changed_datastores found or not when in check mode.

You can work around this issue by defining a changed_when clause:
```yaml
register: storage_cluster_datastore_result
changed_when: storage_cluster_datastore_result.datastore_cluster_info.changed_datastores|length > 0
```

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
vmware_datastore_cluster_manager

##### ANSIBLE VERSION
```paste below
ansible 2.10.2
  config file = None
  configured module search path = ['/Users/cneugum/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.5 (default, Oct 12 2020, 11:36:53) [Clang 12.0.0 (clang-1200.0.32.2)]
```

##### CONFIGURATION
Default

##### OS / ENVIRONMENT
Ansible running on: OSX 10.15.7
vCenter running on: vSphere 6.7


##### STEPS TO REPRODUCE

1. Create a play that uses the module and run it so datastores are added to the datastore cluster
2. Run the same play again
3. Run the same play in check mode

```yaml
- name: Test Datastore Cluster
  hosts: localhost
  gather_facts: no
  vars:
    vcenter:
      hostname: 'vcsa.lab.local'
      username: 'administrator@vsphere.local'
      password: 'VMware1!'
    datacenter_name: 'DC01'
    datastore_cluster_name: 'StorageCluster01'
    datastores: 
      - "DS01"
      - "DS02"
      - "DS03"
  tasks:
    - name: Create datastore cluster
      community.vmware.vmware_datastore_cluster:
        hostname: '{{ vcenter.hostname }}'
        username: '{{ vcenter.username }}'
        password: '{{ vcenter.password }}'
        validate_certs: no
        datacenter_name: '{{ datacenter_name }}'
        datastore_cluster_name: '{{ datastore_cluster_name }}'
    - name: Add Datastores to datastore cluster
      community.vmware.vmware_datastore_cluster_manager:
        hostname: '{{ vcenter.hostname }}'
        username: '{{ vcenter.username }}'
        password: '{{ vcenter.password }}'
        validate_certs: no
        datacenter_name: '{{ datacenter_name }}'
        datastore_cluster_name: '{{ datastore_cluster_name }}'
        datastores: '{{ datastores }}'
```

##### EXPECTED RESULTS

1. Play Recap should report changed tasks
2. Play Recap should report no changed tasks
3. Play Recap should report no changed tasks


##### ACTUAL RESULTS

1. Play Recap reports changed tasks
2. Play Recap reports no changed tasks
3. **_Play Recap reports changed tasks_**



Discussion:
Files identified in the description:
* [`plugins/modules/vmware_datastore_cluster_manager.py`](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/vmware_datastore_cluster_manager.py)

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @Akasurde @Tomorrow9 @goneri @lparkes @pgbidkar @warthog9
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
I think I know where the code goes wrong. I'll try to do something about it.

Resolving patch:
diff --git a/plugins/modules/vmware_datastore_cluster_manager.py b/plugins/modules/vmware_datastore_cluster_manager.py
--- a/plugins/modules/vmware_datastore_cluster_manager.py
+++ b/plugins/modules/vmware_datastore_cluster_manager.py
@@ -161,7 +161,7 @@ def ensure(self):
                 changed_list = [ds.name for ds in datastore_obj_list]
                 temp_result['current_datastores'] = temp_result['previous_datastores'].extend(changed_list)
                 temp_result['changed_datastores'] = changed_list
-                results['changed'] = True
+                results['changed'] = len(datastore_obj_list) > 0
                 results['datastore_cluster_info'] = temp_result
                 self.module.exit_json(**results)
 
@@ -191,7 +191,7 @@ def ensure(self):
                 for ds in changed_list:
                     temp_result['current_datastores'].pop(ds)
                 temp_result['changed_datastores'] = changed_list
-                results['changed'] = True
+                results['changed'] = len(datastore_obj_list) > 0
                 results['datastore_cluster_info'] = temp_result
                 self.module.exit_json(**results)
 


Test patch: