here is my code

- hosts: localhost
  connection: localhost
  vars:
   vcenter_hostname: myVcenter
   vcenter_username: **************
   vcenter_password: '**********'
  tasks:
  - name: Create a virtual machine from a template
    vmware_guest:
      hostname: "{{ vcenter_hostname }}"
      username: "{{ vcenter_username }}"
      password: "{{ vcenter_password }}"
      validate_certs: no
      folder: /RHEL
      name: mtest
      state: poweredon
      #template: template_el7
      cdrom:
       - controller_number: 0
         controller_type: sata
         unit_number: 0
         type: client
         state: present
    delegate_to: localhost

===========
$ ansible --version
ansible 2.9.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = 
[u'/home/athangal/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug 13 2020, 02:51:10) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-39)]

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b741f2a1-832e-4616-9332-823c95b9ef97n%40googlegroups.com.

Reply via email to