Configure eth1 and set hostname
This commit is contained in:
parent
7bbd42d1e6
commit
63eb166eb9
@ -13,7 +13,7 @@ locals {
|
||||
|
||||
microOS_install_commands = [
|
||||
"set -ex",
|
||||
"apt install -y aria2",
|
||||
"apt-get install -y aria2",
|
||||
"aria2c --follow-metalink=mem https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-k3s-kvm-and-xen.qcow2.meta4",
|
||||
"qemu-img convert -p -f qcow2 -O host_device $(ls -a | grep -ie '^opensuse.*microos.*k3s.*qcow2$') /dev/sda",
|
||||
"sgdisk -e /dev/sda",
|
||||
|
@ -33,6 +33,7 @@ resource "hcloud_server" "first_control_plane" {
|
||||
|
||||
provisioner "file" {
|
||||
content = templatefile("${path.module}/templates/config.ign.tpl", {
|
||||
name = self.name
|
||||
ssh_public_key = local.ssh_public_key
|
||||
})
|
||||
destination = "/root/config.ign"
|
||||
|
@ -11,5 +11,21 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"files": [
|
||||
{
|
||||
"path": "/etc/hostname",
|
||||
"mode": 420,
|
||||
"overwrite": true,
|
||||
"contents": { "source": "data:,${name}" }
|
||||
},
|
||||
{
|
||||
"path": "/etc/sysconfig/network/ifcfg-eth1",
|
||||
"mode": 420,
|
||||
"overwrite": true,
|
||||
"contents": { "source": "data:,BOOTPROTO%3D%27dhcp%27%0ASTARTMODE%3D%27auto%27" }
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user