Check_mode is not working for vmware_rest api module

We are testing ansible vmware module were we wanted to test in dry run mode the playbooks which has vmware rest modules used and we see the --check or check_mode = yes is not working its deletes the vm where its except to just dry run the task . Just wanted to understand the dryrun works for vmware modules?

Thanks
Deepak Kumar

Deepak

You may get more responses if you provide actual examples in the form of playbook/task/role you are attempting. Please also identify the Ansible version and the VMWare module/version you are using.

Hi Andrew,

Please find the details .
COMPONENT NAME

vmware.vmware_rest.vcenter_vm:

ANSIBLE VERSION
config file = None configured module search path = [‘/home/deep/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’] ansible python module location = /home/deep/.local/lib/python3.10/site-packages/ansible ansible collection location = /home/deep/.ansible/collections:/usr/share/ansible/collections executable location = /home/deep/.local/bin/ansible python version = 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] jinja version = 3.1.2 libyaml = True
COLLECTION VERSION

`# /home/deep/.ansible/collections/ansible_collections
Collection Version

vmware.vmware_rest 2.3.1

CONFIGURATION ```paste below

OS / ENVIRONMENT

PRETTY_NAME=“Ubuntu 22.04.1 LTS”
NAME=“Ubuntu”
VERSION_ID=“22.04”
VERSION=“22.04.1 LTS (Jammy Jellyfish)”
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL=“https://www.ubuntu.com/
SUPPORT_URL=“https://help.ubuntu.com/
BUG_REPORT_URL=“https://bugs.launchpad.net/ubuntu/
PRIVACY_POLICY_URL=“https://www.ubuntu.com/legal/terms-and-policies/privacy-policy
UBUNTU_CODENAME=jammy

STEPS TO REPRODUCE

Try to dry run the playbook delvm.yml
ansible-playbook delvm.yml --check -i inventory --limit test-host

Hello Deepak,
I am also currently considering with the question you raised. As far as I can say at the moment is the supports_check_mode parameter is always set to true, but the check_mode is not queried or checked anywhere. This means that it is indicated that the check mode is supported, although it is not. The --check parameter therefore has no effect. The check mode is not supported.
Best regards
Stefan