cloud-init is not disabled.
When changing IP addresses or DNS server IP addresses, how do you handle it?
I believe directly editing 50-cloud-init.yaml is not recommended, so I do the following:
- Create /etc/cloud/cloud-init.disabled
- mv -i /etc/netplan/50-cloud-init.yaml /etc/netplan/55-base.yaml
︎File names should be 50 or higher, as appropriate.
For simple tasks like changing the IP, I sometimes wonder if directly editing 50-cloud-init.yaml would be acceptable.
I’d like to know what the recommended approach is.
Hi
I don’t have any servers running 24.04 at the moment, but I think the default renderer is Network Manager. If you view that .yaml file, it will show that I believe. You would not edit this file if you are using network manager.
When using network manager, you need to use nmcli commands to view & configure your connections.
Check out the manpage here for nmcli
https://manpages.ubuntu.com/manpages/jammy/man1/nmcli.1.html
What you are looking for should be addressed somewhere in the Connection Management Commands section.
Maybe start with a command like this to view the profile of your connections:
nmcli con show
I have used network manager to configure servers in the past, but I would have to dig up some of my command notes to give you more specifics. I typically use networkd as the render and configure everything in a custom .yaml file. No right or wrong way here, you would probably be best just to learn a few nmcli commands.
There is probably an official Ubuntu tutorial on network manager somewhere that I don’t have at my fingertips, maybe check for that as well.
The default renderer in 24.04 Server is NetPlan itself.
That’s the manpage for 22.04. 24.04 would be the same URL but with Noble:
https://manpages.ubuntu.com/manpages/noble/man1/nmcli.1.html
But still irrelevant as that’s for NetworkManager, which is only the renderer for Desktop installs.
1 Like