17 lines
673 B
YAML
17 lines
673 B
YAML
---
|
|
- name: Define a virtual machine in Proxmox
|
|
proxmox_kvm:
|
|
api_user: "{{ ansible_user_id }}@pam"
|
|
api_password: "{{ password }}"
|
|
api_host: "{{ item.virtu }}.adm.auro.re"
|
|
name: "{{ item.name }}"
|
|
node: "{{ item.virtu }}"
|
|
scsihw: virtio-scsi-pci
|
|
scsi: '{"scsi0":"{{ item.virtu }}:{{ item.disksize }},format=raw"}'
|
|
sata: '{"sata0":"local:iso/{{ item.installiso }},media=cdrom"}'
|
|
net: '{"net0":"virtio,bridge=vmbr2"}' # Adm only by default
|
|
cores: "{{ item.cores }}"
|
|
memory: "{{ item.memory }}"
|
|
balloon: "{{ item.memory // 2 }}"
|
|
bios: seabios # Ansible module doesn't support UEFI boot disk
|
|
loop: "{{ vm_definitions }}"
|