How to create snapshot of vm using ansible

Hello Team

i want to create snapshot of vm using ansible playbook

does it require any ports to be open to get this done??

if yes then which are the ports required to be open from ansible server to vcentre

is there any sample playbook to understand??

https://github.com/ansible-collections/community.vmware/blob/b5eb08db178ead605a0f233f8a88ef6435b5c709/plugins/modules/vmware_guest_snapshot.py#L131

Thanks Abhijit

do i need to open any ports for this ansible to run safely also i need to take more machine snapshot in single playbook so in that case what will be the folder parameter??

Is there any working ansible playbook for this??

No additional port is required, the existing 443 or https port works.

The folder is the path to your VM for example /<YOUR_DC>/vm/

This is the best I can find - https://github.com/Akasurde/VMworld_2018_demo/blob/5302dec58fd126fbfc1c577b7b9d8d77b9a8c37c/demo_2.yml#L34