From 9e63e243b864f28cdef058562a587e89d2ccbb29 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 4 Jan 2023 15:36:20 +0100 Subject: [PATCH] Add missing vApp property;Fix preflight check;Add missing folder;Revert Longhorn&K3s version --- ansible/roles/assets/tasks/main.yml | 1 + .../roles/preflight/tasks/main.yml | 20 ++++++++++++------- .../workloadcluster/tasks/clusterapi.yml | 2 +- ansible/vars/metacluster.yml | 6 ++++-- scripts/Update-OvfConfiguration.yml | 8 ++++++++ 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ansible/roles/assets/tasks/main.yml b/ansible/roles/assets/tasks/main.yml index 933a467..a1258d5 100644 --- a/ansible/roles/assets/tasks/main.yml +++ b/ansible/roles/assets/tasks/main.yml @@ -3,6 +3,7 @@ path: "{{ item }}" state: directory loop: + - /etc/rancher/k3s - /opt/metacluster/cluster-api/bootstrap-kubeadm/{{ components.clusterapi.management.version.base }} - /opt/metacluster/cluster-api/cert-manager/{{ components.clusterapi.management.version.cert_manager }} - /opt/metacluster/cluster-api/cluster-api/{{ components.clusterapi.management.version.base }} diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/preflight/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/roles/preflight/tasks/main.yml index 2dbfa4e..b609a8a 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/preflight/tasks/main.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/preflight/tasks/main.yml @@ -1,7 +1,13 @@ -- name: Check for vCenter connectivity - community.vmware.vmware_vcenter_settings_info: - hostname: "{{ vapp['hv.fqdn'] }}" - username: "{{ vapp['hv.username'] }}" - password: "{{ vapp['hv.password'] }}" - schema: vsphere - register: vcenter_info +- block: + + - name: Check for vCenter connectivity + community.vmware.vmware_vcenter_settings_info: + schema: vsphere + register: vcenter_info + + module_defaults: + group/vmware: + hostname: "{{ vapp['hv.fqdn'] }}" + validate_certs: no + username: "{{ vapp['hv.username'] }}" + password: "{{ vapp['hv.password'] }}" diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml index 5d92e33..e200c5a 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/clusterapi.yml @@ -83,7 +83,7 @@ ansible.builtin.shell: cmd: >- clusterctl generate cluster \ - vapp['workloadcluster.name'] \ + {{ vapp['workloadcluster.name'] | lower }} \ --control-plane-machine-count {{ clustersize.controlplane }} \ --worker-machine-count {{ clustersize.workers }} \ --from ./custom-cluster-template.yaml \ diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index a915e69..5df821b 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -1,7 +1,9 @@ platform: k3s: - version: v1.26.0+k3s1 + # version: v1.26.0+k3s1 + # max supported version by Longhorn is