need to get info for /etc/passwd /etc/group

any idea how I would get this info from 20 esx servers?

do I do a ad-hoc command or is there a module or playbook?

To get info from the passwd/group files, use the getent module: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/getent_module.html