# Help on vmware\_vm\_shell module

**URL:** <https://forum.ansible.com/t/help-on-vmware-vm-shell-module/26176>\
**Category:** Ansible Project\
**Created:** [November 30, 2017, 12:44pm UTC](https://forum.ansible.com/t/help-on-vmware-vm-shell-module/26176 "2017-11-30T12:44:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![A.PRADEEP\_ANNAMALAI](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@A.PRADEEP\_ANNAMALAI](https://forum.ansible.com/u/A.PRADEEP_ANNAMALAI)\
**Post date:** [November 30, 2017, 12:44pm UTC](https://forum.ansible.com/t/help-on-vmware-vm-shell-module/26176/1 "2017-11-30T12:44:26Z")

</div>

Hi

I am using vmware\_vm\_shell module as below to execute commands in VMs in ESXI hosts . if it is a matter of 2 or 3 esxi servers , it is easier to prepare a yaml list or dictionary as a vars file and use it in the module . What if there are 100 ESXI hosts and 300+ VMs to execute any command . Is there a way to convert a comma seperated file to a nice yaml list or dictionary ?

```auto
vmware_vm_shell:
  hostname: "{{item.key}}"
  username: blahxxxx
  password: blahxxxx
  validate_certs: no
  vm_id: "{{item.value.name}}"
  vm_username: blahxxx
  vm_password: blahxxxx
  vm_shell: /bin/touch
  vm_shell_args: "touch /tmp/{{item.value.ip_address}}.txt"
  #vm_shell_cwd: "/tmp"
with_dict: "{{values}}"
#delegate_to: localhost

```

My vars.yml file used for above play is as below for 2 esxi servers
