ansible/test/integration/targets/prepare_vmware_tests/tasks/setup_virtualmachines.yml
Gonéri Le Bouder 0aa59ce9ab vmware/test: use better name for datastores
In the VMware tests, we call the datastores `ds1` and `ds2`. The first
one is read-only, the second is read-write and can be used to deploy
VMs. The naming convention was not clear enough and source of a lot
confusion and mistake.

We now have two better names:

- ro_datastore, which is ... read-only
- rw_datastore, the one that we can use to deploy new VM.
2019-11-14 16:55:05 -05:00

46 lines
1 KiB
YAML

---
- name: Create VMs
vmware_guest:
datacenter: "{{ dc1 }}"
folder: '{{ item.folder }}'
name: '{{ item.name }}'
state: poweredoff
guest_id: debian8_64Guest
disk:
- size_gb: 1
type: thin
datastore: '{{ rw_datastore }}'
hardware:
memory_mb: 128
num_cpus: 1
scsi: paravirtual
cdrom:
type: iso
iso_path: "[{{ ro_datastore }}] fedora.iso"
networks:
- name: VM Network
with_items: '{{ virtual_machines }}'
- name: Create VMs in cluster
vmware_guest:
datacenter: "{{ dc1 }}"
folder: '{{ item.folder }}'
cluster: '{{ item.cluster }}'
name: '{{ item.name }}'
state: poweredoff
guest_id: debian8_64Guest
disk:
- size_gb: 1
type: thin
datastore: '{{ rw_datastore }}'
hardware:
memory_mb: 128
num_cpus: 1
scsi: paravirtual
cdrom:
type: iso
iso_path: "[{{ ro_datastore }}] fedora.iso"
networks:
- name: VM Network
with_items: '{{ virtual_machines_in_cluster }}'