From b644dc1a04a64b3ba843e73a08788f0e1ba0f63b Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Mon, 20 Mar 2023 12:40:39 +0100 Subject: [PATCH] Fix indentation;Add partition/filesystem/mount specification;Fix disk unit number --- .../workloadcluster/tasks/nodetemplates.yml | 2 +- .../templates/kustomization.cluster-template.j2 | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/nodetemplates.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/nodetemplates.yml index 7b903c1..fa0545c 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/nodetemplates.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/nodetemplates.yml @@ -43,7 +43,7 @@ - size: 1Gb scsi_controller: 1 scsi_type: paravirtual - unit_number: 1 + unit_number: 0 when: ova_deploy.results[index] is not skipped loop: "{{ ova_deploy.results }}" loop_control: diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 b/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 index 2a4a90b..03b8206 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/templates/kustomization.cluster-template.j2 @@ -25,6 +25,18 @@ patchesStrategicMerge: spec: clusterConfiguration: imageRepository: registry.{{ _template.network.fqdn }}/kubeadm + diskSetup: + filesystems: + - device: /dev/sdb1 + filesystem: ext4 + label: blockstorage + partitions: + - device: /dev/sdb + layout: true + tableType: gpt + mounts: + - - LABEL=blockstorage + - /mnt/blockstorage - |- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate @@ -71,9 +83,9 @@ patchesStrategicMerge: spec: template: spec: + additionalDisksGiB: + - {{ _template.additionaldisk }} network: - additionalDisksGiB: - - {{ _template.additionaldisk }} devices: - dhcp4: false addressesFromPools: