|
|
|
@ -1,6 +1,6 @@
|
|
|
|
---
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check if VM already exists
|
|
|
|
- name: Proxmox - Check if VM already exists
|
|
|
|
community.general.proxmox_vm_info:
|
|
|
|
community.general.proxmox_vm_info:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -11,7 +11,7 @@
|
|
|
|
- create_vm_proxmox_recreate_vm | bool
|
|
|
|
- create_vm_proxmox_recreate_vm | bool
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- name: Delete VM if it already exists
|
|
|
|
- name: Proxmox - Delete VM if it already exists
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
- create_vm_proxmox_recreate_vm | bool
|
|
|
|
- create_vm_proxmox_recreate_vm | bool
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check if VM already exists
|
|
|
|
- name: Proxmox - Check if VM already exists
|
|
|
|
community.general.proxmox_vm_info:
|
|
|
|
community.general.proxmox_vm_info:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -35,7 +35,7 @@
|
|
|
|
register: create_vm_proxmox_check_if_vm_exists
|
|
|
|
register: create_vm_proxmox_check_if_vm_exists
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- name: Clone VM in Proxmox
|
|
|
|
- name: Proxmox - Clone VM in Proxmox
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -52,7 +52,7 @@
|
|
|
|
- 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
|
|
|
|
- name: Proxmox - Manage virtual disks for virtual machine
|
|
|
|
community.general.proxmox_disk:
|
|
|
|
community.general.proxmox_disk:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -68,7 +68,7 @@
|
|
|
|
- create_vm_proxmox_vm_disks is defined
|
|
|
|
- create_vm_proxmox_vm_disks is defined
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- name: Add cloud-init drive
|
|
|
|
- name: Proxmox - Add cloud-init drive
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -80,7 +80,7 @@
|
|
|
|
ide2: "{{ create_vm_proxmox_cloudinit_storage_pool }}:cloudinit,format=raw"
|
|
|
|
ide2: "{{ create_vm_proxmox_cloudinit_storage_pool }}:cloudinit,format=raw"
|
|
|
|
when: create_vm_proxmox_add_cloudinit_drive | bool
|
|
|
|
when: create_vm_proxmox_add_cloudinit_drive | bool
|
|
|
|
|
|
|
|
|
|
|
|
- name: Add cloud-init settings
|
|
|
|
- name: Proxmox - Add cloud-init settings
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -101,7 +101,7 @@
|
|
|
|
- create_vm_proxmox_configure_cloudinit | bool
|
|
|
|
- create_vm_proxmox_configure_cloudinit | bool
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- name: Enable QEMU guest agent for VM
|
|
|
|
- name: Proxmox - Enable QEMU guest agent for VM
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -115,7 +115,7 @@
|
|
|
|
- create_vm_proxmox_enable_guest_agent | bool
|
|
|
|
- create_vm_proxmox_enable_guest_agent | bool
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set VM to autostart
|
|
|
|
- name: Proxmox - Set VM to autostart
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
@ -129,7 +129,7 @@
|
|
|
|
- create_vm_proxmox_start_vm_onboot | bool
|
|
|
|
- create_vm_proxmox_start_vm_onboot | bool
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
- name: Start VM
|
|
|
|
- name: Proxmox - Start VM
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
community.general.proxmox_kvm:
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_host: "{{ create_vm_proxmox_host }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
api_user: "{{ create_vm_proxmox_user }}"
|
|
|
|
|