diff --git a/main.yml b/main.yml index 560e050..c2e57d3 100644 --- a/main.yml +++ b/main.yml @@ -78,3 +78,15 @@ when: install_type == "virtual" vars: 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 diff --git a/roles/cleanup/tasks/main.yml b/roles/cleanup/tasks/main.yml index 7fa9dbc..5d2a55f 100644 --- a/roles/cleanup/tasks/main.yml +++ b/roles/cleanup/tasks/main.yml @@ -1,6 +1,8 @@ --- - name: Shutdown the VM community.general.shutdown: + vars: + ansible_connection: ssh - name: Setup Cleanup when: hypervisor == "proxmox"