Add final check if the VM is up and running after reboot

This commit is contained in:
Sandwich 2024-11-01 23:58:52 +01:00
parent cbe238f4d5
commit 89f054e8fd
2 changed files with 14 additions and 0 deletions

View File

@ -78,3 +78,15 @@
when: install_type == "virtual" when: install_type == "virtual"
vars: vars:
ansible_connection: local ansible_connection: local
tasks:
- name: Set final SSH Credentials
when: hypervisor == 'vmware' and vmware_ssh | bool
ansible.builtin.set_fact:
ansible_user: "{{ user_name }}"
ansible_password: "{{ user_password }}"
ansible_become_password: "{{ user_password }}"
- name: Check if VM is back and running
ansible.builtin.wait_for_connection:
timeout: 300

View File

@ -1,6 +1,8 @@
--- ---
- name: Shutdown the VM - name: Shutdown the VM
community.general.shutdown: community.general.shutdown:
vars:
ansible_connection: ssh
- name: Setup Cleanup - name: Setup Cleanup
when: hypervisor == "proxmox" when: hypervisor == "proxmox"