Tearing my hair out now with Debian Trixie. Working on some ansible to build a p...

@Fishd@infosec.exchange

Tearing my hair out now with Debian Trixie.

Working on some ansible to build a proxmox server... during the play I'm switching from a DHCP assigned address used while the device is imaged via PXE, to a static address... and at this time I'm trying to set nameservers in resolv.conf.

DHCPCD seems to be being triggered by something in the background, and it keeps overwriting the resolv.conf

I've added both "denyinterfaces " and "nohook 20-resolv.conf" (also tried "nohook resolv.conf" as per the dhcpcd documentation but that didn't work either) into the dhcpcd.conf file... but it's not having any effect. I set these options, then write my config into resolv.conf and it sticks for a while, I then get a blank template overwriting it from dhcpcd.

Didn't have problems like this with bullseye or bookworm but I don't think they were using dhcpcd... anyone know what's going on?

(I know I can set the immutable bit on resolv.conf and that will be my very last resort... as it's a bodge, not a fix imo. Like nailing your front door shut because the strike plate is misaligned.)

#linux #sysadmin #ansible #debian #trixie