network fix attempt
This commit is contained in:
parent
580b051ecd
commit
46dd37383c
1
main.tf
1
main.tf
@ -159,7 +159,6 @@ data "hcloud_load_balancer" "traefik" {
|
|||||||
depends_on = [null_resource.kustomization]
|
depends_on = [null_resource.kustomization]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "null_resource" "destroy_traefik_loadbalancer" {
|
resource "null_resource" "destroy_traefik_loadbalancer" {
|
||||||
# this only gets triggered before total destruction of the cluster, but when the necessary elements to run the commands are still available
|
# this only gets triggered before total destruction of the cluster, but when the necessary elements to run the commands are still available
|
||||||
triggers = {
|
triggers = {
|
||||||
|
@ -61,6 +61,9 @@ locals {
|
|||||||
|
|
||||||
combustion_script = <<EOF
|
combustion_script = <<EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
sed -i 's#NETCONFIG_NIS_SETDOMAINNAME="yes"#NETCONFIG_NIS_SETDOMAINNAME="no"#g' /etc/sysconfig/network/config
|
||||||
|
sed -i 's#WAIT_FOR_INTERFACES="30"#WAIT_FOR_INTERFACES="60"#g' /etc/sysconfig/network/config
|
||||||
|
sed -i 's#CHECK_DUPLICATE_IP="yes"#CHECK_DUPLICATE_IP="no"#g' /etc/sysconfig/network/config
|
||||||
# combustion: network
|
# combustion: network
|
||||||
rpm --import https://rpm.rancher.io/public.key
|
rpm --import https://rpm.rancher.io/public.key
|
||||||
zypper refresh
|
zypper refresh
|
||||||
|
@ -59,12 +59,11 @@ resource "hcloud_server" "server" {
|
|||||||
provisioner "remote-exec" {
|
provisioner "remote-exec" {
|
||||||
inline = [
|
inline = [
|
||||||
# Disable automatic reboot (after transactional updates), and configure the reboot method as kured
|
# Disable automatic reboot (after transactional updates), and configure the reboot method as kured
|
||||||
"rebootmgrctl set-strategy off && echo 'REBOOT_METHOD=kured' > /etc/transactional-update.conf",
|
"set -ex",
|
||||||
|
"rebootmgrctl set-strategy off",
|
||||||
|
"echo 'REBOOT_METHOD=kured' > /etc/transactional-update.conf",
|
||||||
# set the hostname
|
# set the hostname
|
||||||
<<-EOT
|
"hostnamectl set-hostname ${self.name}"
|
||||||
hostnamectl set-hostname ${self.name}
|
|
||||||
sed -e 's#NETCONFIG_NIS_SETDOMAINNAME="yes"#NETCONFIG_NIS_SETDOMAINNAME="no"#g' /etc/sysconfig/network/config > /dev/null
|
|
||||||
EOT
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user