@ -47,13 +47,27 @@
vcpus : "{{ create_vm_proxmox_numb_cpus | default(omit) }}"
vcpus : "{{ create_vm_proxmox_numb_cpus | default(omit) }}"
cores : "{{ create_vm_proxmox_numb_cores | default(omit) }}"
cores : "{{ create_vm_proxmox_numb_cores | default(omit) }}"
memory : "{{ create_vm_proxmox_memory_mb | default(omit) }}"
memory : "{{ create_vm_proxmox_memory_mb | default(omit) }}"
scsi : "{{ create_vm_proxmox_scsi | default(omit) }}"
virtio : "{{ create_vm_proxmox_virtio_disks | default(omit) }}"
net : "{{ create_vm_proxmox_net | default(omit) }}"
net : "{{ create_vm_proxmox_net | default(omit) }}"
when:
when:
- create_vm_proxmox_check_if_vm_exists.proxmox_vms | length == 0
- create_vm_proxmox_check_if_vm_exists.proxmox_vms | length == 0
delegate_to : localhost
delegate_to : localhost
- name : Manage virtual disks for virtual machine
community.general.proxmox_disk:
api_host : "{{ create_vm_proxmox_host }}"
api_user : "{{ create_vm_proxmox_user }}"
api_password : "{{ create_vm_proxmox_password }}"
vmid : "{{ create_vm_proxmox_vmid }}"
disk : "{{ item.key }}"
format : "{{ item.value.format | default(omit) }}"
storage : "{{ item.value.storage | default(omit) }}"
size : "{{ item.value.size | default(omit) }}"
state : "{{ item.value.state | default(omit) }}"
loop : "{{ create_vm_proxmox_vm_disks | dict2items }}"
when:
- create_vm_proxmox_vm_disks is defined
delegate_to : localhost
- name : Add cloud-init drive to VM
- name : Add cloud-init drive to VM
community.general.proxmox_kvm:
community.general.proxmox_kvm:
api_host : "{{ create_vm_proxmox_host }}"
api_host : "{{ create_vm_proxmox_host }}"