2019-04-24 19:02:21 +02:00
|
|
|
---
|
2019-05-16 15:36:48 +02:00
|
|
|
- name: Create VMs
|
|
|
|
vmware_guest:
|
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
|
|
|
datacenter: "{{ dc1 }}"
|
2019-04-24 19:02:21 +02:00
|
|
|
validate_certs: no
|
2019-05-16 15:36:48 +02:00
|
|
|
folder: '{{ item.folder }}'
|
|
|
|
name: '{{ item.name }}'
|
|
|
|
state: poweredon
|
|
|
|
guest_id: debian8_64Guest
|
|
|
|
disk:
|
|
|
|
- size_gb: 1
|
|
|
|
type: thin
|
|
|
|
datastore: '{{ ds2 }}'
|
|
|
|
hardware:
|
|
|
|
memory_mb: 128
|
|
|
|
num_cpus: 1
|
|
|
|
scsi: paravirtual
|
|
|
|
cdrom:
|
|
|
|
type: iso
|
|
|
|
iso_path: "[{{ ds1 }}] Fedora-Workstation-Live-x86_64-29-1.2.iso"
|
|
|
|
networks:
|
|
|
|
- name: VM Network
|
|
|
|
with_items: '{{ virtual_machines }}'
|
2019-04-24 19:02:21 +02:00
|
|
|
|
2019-05-16 15:36:48 +02:00
|
|
|
|
|
|
|
- name: Create VMs in cluster
|
2019-04-24 19:02:21 +02:00
|
|
|
vmware_guest:
|
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
|
|
|
datacenter: "{{ dc1 }}"
|
|
|
|
validate_certs: no
|
2019-05-16 15:36:48 +02:00
|
|
|
folder: '{{ item.folder }}'
|
|
|
|
cluster: '{{ item.cluster }}'
|
|
|
|
name: '{{ item.name }}'
|
2019-04-24 19:02:21 +02:00
|
|
|
state: poweredon
|
|
|
|
guest_id: debian8_64Guest
|
|
|
|
disk:
|
|
|
|
- size_gb: 1
|
|
|
|
type: thin
|
|
|
|
datastore: '{{ ds2 }}'
|
|
|
|
hardware:
|
|
|
|
memory_mb: 128
|
|
|
|
num_cpus: 1
|
|
|
|
scsi: paravirtual
|
|
|
|
cdrom:
|
|
|
|
type: iso
|
|
|
|
iso_path: "[{{ ds1 }}] Fedora-Workstation-Live-x86_64-29-1.2.iso"
|
|
|
|
networks:
|
|
|
|
- name: VM Network
|
2019-05-16 15:36:48 +02:00
|
|
|
with_items: '{{ virtual_machines_in_cluster }}'
|