Add fleet hostnaming

This commit is contained in:
Audiobuzz
2026-06-19 09:59:49 +00:00
parent 13ac648267
commit 98c71474d3
7 changed files with 116 additions and 0 deletions
+9
View File
@@ -296,6 +296,15 @@ build {
# ---- Diskless adaptations ------------------------------------------
# Per-host machine-id is generated at boot into the overlay
"truncate -s 0 /etc/machine-id",
# No per-host hostname in the image (image stays fleet-generic): empty
# /etc/hostname so the static hostname is unset and NetworkManager sets the
# transient hostname from the DHCP lease — DHCP option 12 (the dnsmasq
# fleet-namer assigns a creative name per MAC, server-side) or a reverse-DNS
# PTR lookup. hostname-mode=default makes that explicit so a stricter global
# config can't switch it to 'none' and leave hosts unnamed.
"truncate -s 0 /etc/hostname",
"install -D -m0644 /tmp/etc-stage/NetworkManager/conf.d/20-hostname.conf /etc/NetworkManager/conf.d/20-hostname.conf",
"restorecon /etc/NetworkManager/conf.d/20-hostname.conf",
# Read-only erofs/verity root; runtime state on a tmpfs overlay provided
# by systemd.volatile=overlay (set in the cmdline by extract-artifacts.sh).
# RHEL/Rocky dracut has no 'overlayfs'/'rootovl' module.