From 12a7549aaadeff660436447a1c57b68b4a6c110e Mon Sep 17 00:00:00 2001 From: Sandwich Date: Wed, 30 Oct 2024 18:59:32 +0100 Subject: [PATCH] Speed up setup on VMware if ssh is available --- roles/environment/tasks/main.yml | 9 +++++++++ vars_example.yml | 1 + 2 files changed, 10 insertions(+) diff --git a/roles/environment/tasks/main.yml b/roles/environment/tasks/main.yml index aea2e6d..b401725 100644 --- a/roles/environment/tasks/main.yml +++ b/roles/environment/tasks/main.yml @@ -43,6 +43,15 @@ changed_when: result.rc == 0 register: result + - name: Set connection back to SSH + when: hypervisor == "vmware" and vmware_ssh | bool + ansible.builtin.set_fact: + ansible_connection: ssh + ansible_user: "root" + ansible_password: "" + ansible_become_password: "" + ansible_ssh_extra_args: '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' + - name: Speed-up Bootstrap process ansible.builtin.lineinfile: path: /etc/pacman.conf diff --git a/vars_example.yml b/vars_example.yml index 7b51ce4..9a51102 100644 --- a/vars_example.yml +++ b/vars_example.yml @@ -18,3 +18,4 @@ ansible_vmware_guest_path: "/{{ hypervisor_cluster }}/vm{{ vm_path }}/{{ hostnam ansible_vmware_validate_certs: no ansible_vmware_tools_user: "root" ansible_vmware_tools_password: "" +vmware_ssh: true