any idea how to modify my playbook to copy file to multiple datastores on 
multiple vcenters?

--
- name: test
  hosts: all
  gather_facts: no
  vars_files:
    - vcenter_creds.yml
    - vars.yml
  #no_log: True
 
  tasks:
  - name: Copy file to datastore using delegate_to
    community.vmware.vsphere_copy:
      hostname: '{{ vcenter_hostname }}'
      username: '{{ vcenter_sso_admin_esg }}'
      password: '{{ vcenter_sso_admin_esg_pass }}'
      src: '{{ src_file }}'
      datacenter: '{{ datacenter }}'
      datastore: '{{ datastore }}'
      path: '{{ dst_file }}'
      validate_certs: no
    delegate_to: localhost
    run_once: true

-- 
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/b6f5e1a5-e031-4bc1-9d72-e1ff9ce9d17fn%40googlegroups.com.

Reply via email to