Yes, that was the obvious solution. Glad I don't have to type all that in myself, but rather that #Hashicorp #Packer does that for me.
(I have to configure the network to set "dhcp-identifier: mac" in Netplan, *before* the autoinstall file is downloaded; to mimic what happens when I install NetworkManager in the generated VM, otherwise it switched IP addresses after reboot, and Packer fails to log in over SSH).
Definitely did not waste most of today figuring this out...