In recent Ubuntu, netplan is the default way of configuring network adapters. I want a static IP on one of mine, and there are some guides on how to do that. Some point you to editing 50-cloud-init.yaml. But that file has an ominous warning:
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
One answer on askubuntu references this and has the user do just so. (Note it has the renderer set to networkd.)
Which approach is right? Do they both work?
Most confusing, what does "persist across an instance" mean? The settings persist just fine across a reboot. When would I expect to lose settings in 50-cloud-init.yaml?