man-pages/man8/netplan-generate.8.html
2021-03-31 01:06:50 +01:00

153 lines
4.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of netplan-generate</TITLE>
</HEAD><BODY>
<H1>netplan-generate</H1>
Section: (8)<BR>Updated: <BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<P>
netplan-generate - generate backend configuration from netplan YAML
files
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
netplan [-debug] generate -h | -help
<P>
netplan [-debug] generate [-root-dir
ROOT_DIR] [-mapping MAPPING]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
netplan generate converts netplan YAML into configuration files
understood by the backends (<A HREF="/cgi-bin/man/man2html?8+systemd-networkd">systemd-networkd</A>(8) or
<A HREF="/cgi-bin/man/man2html?8+NetworkManager">NetworkManager</A>(8)).
It does not apply the generated configuration.
<P>
You will not normally need to run this directly as it is run by
netplan apply, netplan try, or at boot.
<P>
Only if executed during the systemd initializing phase
(i.e.&nbsp;"Early bootup, before basic.target is
reached"), will it attempt to start/apply the newly created service
units.
Requires feature: generate-just-in-time
<P>
For details of the configuration file format, see <A HREF="/cgi-bin/man/man2html?5+netplan">netplan</A>(5).
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-h, -help</B>
<DD>
Print basic help.
<DT id="2"><B>-debug</B>
<DD>
Print debugging output during the process.
<DT id="3"><B>-root-dir </B>ROOT_DIR
<DD>
Instead of looking in /{lib,etc,run}/netplan, look in
/ROOT_DIR/{lib,etc,run}/netplan
<DT id="4"><B>-mapping </B>MAPPING
<DD>
Instead of generating output files, parse the configuration files and
print some internal information about the device specified in
MAPPING.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>HANDLING MULTIPLE FILES</H2>
<P>
There are 3 locations that netplan generate considers:
<DL COMPACT>
<DT id="5">&bull;<DD>
/lib/netplan/*.yaml
<DT id="6">&bull;<DD>
/etc/netplan/*.yaml
<DT id="7">&bull;<DD>
/run/netplan/*.yaml
</DL>
<P>
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.
<P>
Or in other words, /run/netplan is top priority, then /etc/netplan, with
/lib/netplan having the lowest priority.
<P>
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.
<P>
If you have two files with the same key/setting, the following rules
apply:
<DL COMPACT>
<DT id="8">&bull;<DD>
If the values are YAML boolean or scalar values (numbers and strings)
the old value is overwritten by the new value.
<DT id="9">&bull;<DD>
If the values are sequences, the sequences are concatenated - the new
values are appended to the old list.
<DT id="10">&bull;<DD>
If the values are mappings, netplan will examine the elements of the
mappings in turn using these rules.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<A HREF="/cgi-bin/man/man2html?5+netplan">netplan</A>(5), <A HREF="/cgi-bin/man/man2html?8+netplan-apply">netplan-apply</A>(8),
<A HREF="/cgi-bin/man/man2html?8+netplan-try">netplan-try</A>(8), <A HREF="/cgi-bin/man/man2html?8+systemd-networkd">systemd-networkd</A>(8),
<A HREF="/cgi-bin/man/man2html?8+NetworkManager">NetworkManager</A>(8)
<A NAME="lbAH">&nbsp;</A>
<H2>AUTHORS</H2>
Daniel Axtens (&lt;<A HREF="mailto:daniel.axtens@canonical.com">daniel.axtens@canonical.com</A>&gt;).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="11"><A HREF="#lbAB">NAME</A><DD>
<DT id="12"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="13"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="14"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="15"><A HREF="#lbAF">HANDLING MULTIPLE FILES</A><DD>
<DT id="16"><A HREF="#lbAG">SEE ALSO</A><DD>
<DT id="17"><A HREF="#lbAH">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:14 GMT, March 31, 2021
</BODY>
</HTML>