From 221d77b94dc5cc27d55ba470117e359dd1a7b030 Mon Sep 17 00:00:00 2001 From: Sandwich Date: Fri, 17 Jan 2025 00:38:35 +0100 Subject: [PATCH] Do not reboot localhost! --- roles/cleanup/tasks/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/cleanup/tasks/main.yml b/roles/cleanup/tasks/main.yml index 5d2a55f..5e1cbfa 100644 --- a/roles/cleanup/tasks/main.yml +++ b/roles/cleanup/tasks/main.yml @@ -22,10 +22,14 @@ - ide0 - ide2 - - name: Reboot system - ansible.builtin.command: reboot - failed_when: false - changed_when: false + - name: Start the VM + community.general.proxmox_kvm: + api_host: "{{ hypervisor_url }}" + api_user: "{{ hypervisor_username }}" + api_password: "{{ hypervisor_password }}" + node: "{{ hypervisor_node }}" + vmid: "{{ vm_id }}" + state: started - name: Clean vCenter VM when: hypervisor == "vmware"