mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-08 20:15:03 +10:00
Add dns restart service
This commit is contained in:
@@ -236,3 +236,12 @@ git reflog
|
||||
|
||||
```
|
||||
git reset --hard HEAD@{1}
|
||||
|
||||
|
||||
# vmware exsi complains volume is full
|
||||
# There is no more space for virtual disk 'server-3-000006.vmdk'. You might be able to continue this session by freeing disk space on the relevant volume, and clicking Retry. Click Cancel to terminate this session.
|
||||
# It was because virtual machine consumes space, so does the snapshot!
|
||||
|
||||
# enable vmware ssh through UI and then Find large files
|
||||
df -h
|
||||
find /vmfs/volumes/tiplus-ssd/ -type f -size +1000000k -exec ls -lh {} \;
|
||||
|
||||
@@ -65,6 +65,25 @@ resource "ssh_resource" "k3s_install" {
|
||||
]
|
||||
}
|
||||
|
||||
resource "ssh_resource" "dns_fix" {
|
||||
depends_on = [ssh_resource.k3s_install]
|
||||
|
||||
host = local.ssh_host
|
||||
user = local.ssh_user
|
||||
port = local.ssh_port
|
||||
private_key = local.ssh_private_key
|
||||
timeout = "3m"
|
||||
|
||||
when = "create"
|
||||
|
||||
commands = [
|
||||
"cat << 'EOF' | sudo tee /etc/systemd/system/systemd-resolved-restart.service\n[Unit]\nDescription=Restart systemd-resolved\nAfter=network.target\n\n[Service]\nType=oneshot\nExecStart=/bin/systemctl restart systemd-resolved\n\n[Install]\nWantedBy=multi-user.target\nEOF",
|
||||
"sudo systemctl enable systemd-resolved-restart.service",
|
||||
"sudo systemctl start systemd-resolved-restart.service",
|
||||
"echo 'DNS fix service installed and enabled'"
|
||||
]
|
||||
}
|
||||
|
||||
output "k3s_token" {
|
||||
value = local.token_cmd
|
||||
sensitive = false
|
||||
|
||||
Reference in New Issue
Block a user