Expand description
Netplan network configuration actions (Ubuntu Server).
Netplan is the default network configuration tool on Ubuntu Server. It
generates backend configuration for either systemd-networkd or
NetworkManager from YAML files in /etc/netplan/.
§When to use netplan vs NetworkManager
- Ubuntu Desktop:
nmcli/NetworkManager(Phase 2a actions) - Ubuntu Server / headless: netplan → detected via
which netplan
The executor routes NetplanApply and NetplanGetConfig here when the
distro is Ubuntu. On Fedora the actions return an unsupported-on-distro
error (netplan is not installed by default on Fedora).
§SSH disconnect risk
NetplanApply reloads network interfaces immediately. On a remote session,
a misconfigured netplan YAML can drop the SSH connection with no path to
recovery other than console or OOB access. The preview profile carries an
explicit warning about this risk.
Functions§
- netplan_
apply - Apply the current netplan configuration (
netplan apply). - netplan_
generate - Regenerate backend configuration from netplan YAML without applying it
(
sudo netplan generate). - netplan_
get_ config - Read current netplan configuration files via
find /etc/netplan -name '*.yaml' -print -exec cat {} +. - netplan_
set - Set a single netplan key to a value (
sudo netplan set <key>=<value>). - specs
- Return one representative
ActionSpecper netplan action name.