Hello,
I was using Ansible to deploy an image using the following code :
`---
The question can I deploy multiple images in the same code ?
IS there any code that I can use to deploy multiple images ? I used this code and it works without any issues
I mean what if I want to deploy 20 VMS in the same time ?
Best Regards
name: Clone multiple VMs
hosts: localhost
gather_facts: false
vars_files:
multiple_vms.yml
tasks:
- name: Clone multiple VMs from template
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: no
folder: "{{ folder }}"
template: "{{ vmtemplate }}"
name: "{{ item }}"
cluster: "{{ vmcluster }}"
datacenter: CloudLocal
state: poweredon
customization_spec: "{{ customization_spec }}"
with_items: "{{ servers }}"multiple_vms.yml--- vcenter_hostname: <FQDN or IP of your vCenter Server> username: admini...@vsphere.local password: <your password> folder: testansible datastore: vsanDatastore vmtemplate: Win2019clone customization_spec: <your customization spec> vmcluster: vsancluster servers: - test19_01 - test19_02
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4c3cdd39-52ec-4282-adac-d4f3bbe8a99an%40googlegroups.com.