fix: add networkmanager config for eth0 to set route metric
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2023-03-26 21:40:20 +02:00
parent 05add10a5c
commit 5cad03393b
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,4 @@
[connection-eth0]
match-device=interface-name:eth0
ipv4.route-metric=0
ipv6.route-metric=0

View File

@ -166,6 +166,11 @@ ${files_hcloud_ssh_keys_service}
EOF
systemctl enable hcloud-ssh-keys.service
cat >/etc/NetworkManager/conf.d/eth0.conf <<\EOF
${files_hcloud_nm_eth0}
EOF
chmod 644 /etc/NetworkManager/conf.d/eth0.conf
%end
### Reboot after the installation is complete.

View File

@ -20,6 +20,7 @@ locals {
files_hetznercloud_default_init = file("${abspath(path.root)}/data/files/90-hetznercloud.cfg")
files_hetznercloud_ds_init = file("${abspath(path.root)}/data/files/92-hetznercloud-ds.cfg")
files_hetznercloud_init = file("${abspath(path.root)}/data/files/93-hetznercloud.cfg")
files_hcloud_nm_eth0 = file("${abspath(path.root)}/data/files/nm-eth0.conf")
})
build_id = "${uuidv4()}"
build_labels = {