File tree Expand file tree Collapse file tree 2 files changed +33
-9
lines changed
leaseweb/server/installation Expand file tree Collapse file tree 2 files changed +33
-9
lines changed Original file line number Diff line number Diff line change @@ -61,29 +61,27 @@ MACAddress=${var.internal_mac}
6161
6262[Network]
6363Address=${ var . internal_ip } /16
64- Gateway=10.32.0.1
65- DNS=10.164.15.230
64+ Gateway=${ var . internal_gateway }
65+ DNS=${ var . internal_dns }
6666EOR
6767
6868systemctl disable NetworkManager
6969systemctl enable systemd-networkd
7070
7171cat > /etc/resolv.conf <<EOR
72- nameserver 10.164.15.230
72+ nameserver ${ var . internal_dns }
7373EOR
7474
75- sgdisk -n 4:0:0 -t 4:8300 -c 4:data /dev/sda
76-
7775reboot
7876EOT
7977
8078 raid {
81- type = " HW "
79+ type = var . raid_type
8280 level = 1
8381 number_of_disks = 2
8482 }
8583
86- device = " SATA_SAS "
84+ device = var . device
8785
8886 partition {
8987 mountpoint = " /boot"
9795 size = 20480
9896 }
9997
98+ partition {
99+ mountpoint = " /data"
100+ filesystem = " ext4"
101+ size = " *"
102+ }
103+
100104 timeouts {
101- create = " 30m "
105+ create = " 60m "
102106 }
103107
104108 lifecycle {
109+ prevent_destroy = true
105110 ignore_changes = [
106111 password ,
107112 post_install_script ,
108113 ]
109- prevent_destroy = true
110114 }
111115}
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ variable "hostname" {
66 type = string
77}
88
9+ variable "raid_type" {
10+ type = string
11+ default = " HW"
12+ }
13+
14+ variable "device" {
15+ type = string
16+ default = " SATA_SAS"
17+ }
18+
919variable "internal_mac" {
1020 type = string
1121}
@@ -14,6 +24,16 @@ variable "internal_ip" {
1424 type = string
1525}
1626
27+ variable "internal_gateway" {
28+ type = string
29+ default = " 10.32.0.1"
30+ }
31+
32+ variable "internal_dns" {
33+ type = string
34+ default = " 10.164.15.230"
35+ }
36+
1737variable "enrollment_token" {
1838 type = string
1939 sensitive = true
You can’t perform that action at this time.
0 commit comments