Add final check if the VM is up and running after reboot
This commit is contained in:
parent
cbe238f4d5
commit
89f054e8fd
12
main.yml
12
main.yml
@ -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
|
||||||
|
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user