.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "NETPLAN-GENERATE" "8" "" "" "" .hy .SH NAME .PP \f[V]netplan-generate\f[R] - generate back-end configuration from Netplan YAML files .SH SYNOPSIS .PP \f[B]\f[VB]netplan\f[B]\f[R] [\f[I]--debug\f[R]] \f[B]generate\f[R] \f[B]-h\f[R]|\f[B]--help\f[R] .PP \f[B]\f[VB]netplan\f[B]\f[R] [\f[I]--debug\f[R]] \f[B]generate\f[R] [\f[I]--root-dir ROOT_DIR\f[R]] [\f[I]--mapping MAPPING\f[R]] .SH DESCRIPTION .PP \f[B]\f[VB]netplan generate\f[B]\f[R] converts Netplan YAML into configuration files understood by the back ends (\f[B]\f[VB]systemd-networkd\f[B]\f[R](8) or \f[B]\f[VB]NetworkManager\f[B]\f[R](8)). It \f[I]does not\f[R] apply the generated configuration. .PP You will not normally need to run this directly as it is run by \f[B]\f[VB]netplan apply\f[B]\f[R], \f[B]\f[VB]netplan try\f[B]\f[R], or at boot. .PP Only if executed during the systemd \f[V]initializing\f[R] phase (i.e. \[dq]Early boot, before \f[V]basic.target\f[R] is reached\[dq]), will it attempt to start/apply the newly created service units. **Requires feature: \f[V]generate-just-in-time*\f[R]* .PP For details of the configuration file format, see \f[B]\f[VB]netplan\f[B]\f[R](5). .SH OPTIONS .TP \f[V]-h\f[R], \f[V]--help\f[R] Print basic help. .TP \f[V]--debug\f[R] Print debugging output during the process. .TP \f[V]--root-dir\f[R] \f[I]\f[VI]ROOT_DIR\f[I]\f[R] Instead of looking in \f[V]/{lib,etc,run}/netplan\f[R], look in \f[V]/ROOT_DIR/{lib,etc,run}/netplan\f[R]. .TP \f[V]--mapping\f[R] \f[I]\f[VI]MAPPING\f[I]\f[R] Instead of generating output files, parse the configuration files and print some internal information about the device specified in \f[I]\f[VI]MAPPING\f[I]\f[R]. .SH HANDLING MULTIPLE FILES .PP There are 3 locations that \f[B]\f[VB]netplan generate\f[B]\f[R] considers: .IP \[bu] 2 \f[V]/lib/netplan/*.yaml\f[R] .IP \[bu] 2 \f[V]/etc/netplan/*.yaml\f[R] .IP \[bu] 2 \f[V]/run/netplan/*.yaml\f[R] .PP If there are multiple files with exactly the same name, then only one will be read. A file in \f[V]/run/netplan\f[R] will shadow - completely replace - a file with the same name in \f[V]/etc/netplan\f[R]. A file in \f[V]/etc/netplan\f[R] will itself shadow a file in \f[V]/lib/netplan\f[R]. .PP Or, in other words, \f[V]/run/netplan\f[R] is top priority, then \f[V]/etc/netplan\f[R], with \f[V]/lib/netplan\f[R] having the lowest priority. .PP 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, \f[V]/run/netplan/10-xyz.yaml\f[R] would be updated by \f[V]/lib/netplan/20-abc.yaml\f[R]. .PP If you have two files with the same key/setting, the following rules apply: .IP \[bu] 2 If the values are YAML boolean or scalar values (numbers and strings) the old value is overwritten by the new value. .IP \[bu] 2 If the values are sequences, the sequences are concatenated - the new values are appended to the old list. .IP \[bu] 2 If the values are mappings, Netplan will examine the elements of the mappings in turn using these rules. .SH SEE ALSO .PP \f[B]\f[VB]netplan\f[B]\f[R](5), \f[B]\f[VB]netplan-apply\f[B]\f[R](8), \f[B]\f[VB]netplan-try\f[B]\f[R](8), \f[B]\f[VB]systemd-networkd\f[B]\f[R](8), \f[B]\f[VB]NetworkManager\f[B]\f[R](8) .SH AUTHORS Daniel Axtens ().