vmware_guest - Modify Multiple VM's

10 views
Skip to first unread message

Shaun Glass

unread,
Dec 13, 2018, 4:40:14 AM12/13/18
to Ansible Project
Good Day,

How would one compose a list of VM's to  make changes against. I have the following which works for a single machine :

- hosts: 127.0.0.1
  tasks:
  - name: Change NIC Configuration
    delegate_to: localhost
    vmware_guest:
      hostname: XXXXXXXXX
      username: XXXXXXXXX
      password: XXXXXXXXX
      datacenter: XXXXXXXXX
      name: VSAN025
      validate_certs: False
      state: present
      folder: /XXXXXXXXX
      networks:
      - name: Internal

... however, I need to make changes to dozens of machines. I have tried vars etc but it is like it cannot handle multiple servers against name ?

"msg": "No folder /XXXXXXXXX matched in the search path : /XXXXXXXXX/vm/XXXXXXXXX"

Regards

Shaun
Reply all
Reply to author
Forward
0 new messages