netplan-generate (8)
Leading comments
Automatically generated by Pandoc 1.19.2.4
NAME
netplan-generate - generate backend configuration from netplan YAML files
SYNOPSIS
B]netplan] [--debug] B]generate] -h | --help
B]netplan] [--debug] B]generate] [--root-dir I]ROOT_DIR]] [--mapping I]MAPPING]]
DESCRIPTION
netplan generate converts netplan YAML into configuration files understood by the backends (B]systemd-networkd](8) or B]NetworkManager](8)). It I]does not] apply the generated configuration.
You will not normally need to run this directly as it is run by B]netplan apply], B]netplan try], or at boot.
For details of the configuration file format, see B]netplan](5).
OPTIONS
- -h, --help
-
Print basic help.
- --debug
-
Print debugging output during the process.
- --root-dir I]ROOT_DIR]
-
Instead of looking in /{lib,etc,run}/netplan, look in
/I]ROOT_DIR]/{lib,etc,run}/netplan
- --mapping I]MAPPING]
-
Instead of generating output files, parse the configuration files and
print some internal information about the device specified in
I]MAPPING].
HANDLING MULTIPLE FILES
There are 3 locations that netplan generate considers:
- [bu]
- /lib/netplan/*.yaml
- [bu]
- /etc/netplan/*.yaml
- [bu]
- /run/netplan/*.yaml
If there are multiple files with exactly the same name, then only one will be read. A file in /run/netplan will shadow - completely replace - a file with the same name in /etc/netplan. A file in /etc/netplan will itself shadow a file in /lib/netplan.
Or in other words, /run/netplan is top priority, then /etc/netplan, with /lib/netplan having the lowest priority.
If there are files with different names, then they are considered in lexicographical order - regardless of the directory they are in. Later files add to or override earlier files. For example, /run/netplan/10-foo.yaml would be updated by /lib/netplan/20-abc.yaml.
If you have two files with the same key/setting, the following rules apply:
- [bu]
- If the values are YAML boolean or scalar values (numbers and strings) the old value is overwritten by the new value.
- [bu]
- If the values are sequences, the sequences are concatenated - the new values are appended to the old list.
- [bu]
- If the values are mappings, netplan will examine the elements of the mappings in turn using these rules.
SEE ALSO
B]netplan](5), B]netplan-apply](8), B]netplan-try](8), B]systemd-networkd](8), B]NetworkManager](8)