Create VM from clone delivered.

This commit is contained in:
2025-07-10 11:53:47 -05:00
parent 8212a69802
commit 98cad7348c
7 changed files with 104 additions and 49 deletions

View File

@@ -0,0 +1,32 @@
---
- name: Create VM ID from IP address for Proxmox hosts
hosts: all
gather_facts: false
tasks:
- name: Start Proxmox VM
delegate_to: "localhost"
when: platform is defined and platform == "proxmox"
community.proxmox.proxmox_kvm:
api_user: "{{ proxmox_user }}"
api_password: "{{ proxmox_password }}"
api_host: "{{ proxmox_host }}"
name: "{{ inventory_hostname }}"
node: "{{ proxmox_clone_node }}"
state: started
# - name: Wait for the VM to start
# delegate_to: "localhost"
# wait_for:
# port: 22
# host: "{{ inventory_hostname }}"
# search_regex: OpenSSH
# delay: 10
# timeout: 60
# - name: Wait for the reboot to complete if there was a change.
# wait_for_connection:
# connect_timeout: 10
# sleep: 5
# delay: 5
# timeout: 300