|
|
|
|
@ -68,7 +68,19 @@
|
|
|
|
|
- create_vm_proxmox_vm_disks is defined
|
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
- name: Add cloud-init drive to VM
|
|
|
|
|
- name: Add cloud-init drive
|
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
|
api_password: "{{ create_vm_proxmox_password }}"
|
|
|
|
|
node: "{{ create_vm_proxmox_host }}"
|
|
|
|
|
vmid: "{{ create_vm_proxmox_vmid }}"
|
|
|
|
|
name: "{{ create_vm_proxmox_name }}"
|
|
|
|
|
ide:
|
|
|
|
|
ide2: "{{ create_vm_proxmox_cloudinit_storage_pool }}:cloudinit,format=raw"
|
|
|
|
|
when: create_vm_proxmox_add_cloudinit_drive | bool
|
|
|
|
|
|
|
|
|
|
- name: Add cloud-init settings
|
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
|
@ -84,8 +96,6 @@
|
|
|
|
|
ipconfig: "{{ create_vm_proxmox_cloudinit_ipconfig }}"
|
|
|
|
|
nameservers: "{{ create_vm_proxmox_cloudinit_nameservers }}"
|
|
|
|
|
searchdomains: "{{ create_vm_proxmox_cloudinit_searchdomains }}"
|
|
|
|
|
ide:
|
|
|
|
|
ide2: "{{ create_vm_proxmox_cloudinit_storage_pool }}:cloudinit,format=raw"
|
|
|
|
|
when:
|
|
|
|
|
- create_vm_proxmox_check_if_vm_exists.proxmox_vms | length == 0
|
|
|
|
|
- create_vm_proxmox_configure_cloudinit | bool
|
|
|
|
|
|