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 }}'
|
2019-07-11 08:12:49 +02:00
|
|
|
state: poweredoff
|
2019-05-16 15:36:48 +02:00
|
|
|
guest_id: debian8_64Guest
|
|
|
|
disk:
|
|
|
|
- size_gb: 1
|
|
|
|
type: thin
|
|
|
|
datastore: '{{ ds2 }}'
|
|
|
|
hardware:
|
|
|
|
memory_mb: 128
|
|
|
|
num_cpus: 1
|
|
|
|
scsi: paravirtual
|
|
|
|
cdrom:
|
|
|
|
type: iso
|
2019-06-08 00:34:20 +02:00
|
|
|
iso_path: "[{{ ds1 }}] fedora.iso"
|
2019-05-16 15:36:48 +02:00
|
|
|
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-07-11 08:12:49 +02:00
|
|
|
state: poweredoff
|
2019-04-24 19:02:21 +02:00
|
|
|
guest_id: debian8_64Guest
|
|
|
|
disk:
|
|
|
|
- size_gb: 1
|
|
|
|
type: thin
|
|
|
|
datastore: '{{ ds2 }}'
|
|
|
|
hardware:
|
|
|
|
memory_mb: 128
|
|
|
|
num_cpus: 1
|
|
|
|
scsi: paravirtual
|
|
|
|
cdrom:
|
|
|
|
type: iso
|
2019-06-08 00:34:20 +02:00
|
|
|
iso_path: "[{{ ds1 }}] fedora.iso"
|
2019-04-24 19:02:21 +02:00
|
|
|
networks:
|
|
|
|
- name: VM Network
|
2019-05-16 15:36:48 +02:00
|
|
|
with_items: '{{ virtual_machines_in_cluster }}'
|