Add DNS server configuration for Alpine Linux
This commit is contained in:
@@ -15,10 +15,14 @@ users:
|
||||
ssh_authorized_keys:
|
||||
- ${ssh_key}
|
||||
|
||||
# 3. apk repositories configuration
|
||||
# Pin the two repositories used on this homelab: edge/main + edge/community.
|
||||
# Written BEFORE package_update/package_upgrade so apk uses this config immediately.
|
||||
# 3. Base system files (DNS + apk repos, written before package_update)
|
||||
# Alpine has no netplan/systemd-resolved, so we write resolv.conf ourselves.
|
||||
write_files:
|
||||
- path: /etc/resolv.conf
|
||||
owner: root:root
|
||||
permissions: '0644'
|
||||
content: |
|
||||
nameserver ${dns_server}
|
||||
- path: /etc/apk/repositories
|
||||
owner: root:root
|
||||
permissions: '0644'
|
||||
|
||||
Reference in New Issue
Block a user