1netplan-generate(8) netplan-generate(8)
2
3
4
6 netplan-generate - generate backend configuration from netplan YAML
7 files
8
10 netplan [--debug] generate -h | --help
11
12 netplan [--debug] generate [--root-dir ROOT_DIR] [--mapping MAPPING]
13
15 netplan generate converts netplan YAML into configuration files under‐
16 stood by the backends (systemd-networkd(8) or NetworkManager(8)). It
17 does not apply the generated configuration.
18
19 You will not normally need to run this directly as it is run by netplan
20 apply, netplan try, or at boot.
21
22 Only if executed during the systemd initializing phase (i.e. "Early
23 bootup, before basic.target is reached"), will it attempt to start/ap‐
24 ply the newly created service units. Requires feature: generate-just-
25 in-time
26
27 For details of the configuration file format, see netplan(5).
28
30 -h, --help
31 Print basic help.
32
33 --debug
34 Print debugging output during the process.
35
36 --root-dir ROOT_DIR
37 Instead of looking in /{lib,etc,run}/netplan, look in
38 /ROOT_DIR/{lib,etc,run}/netplan
39
40 --mapping MAPPING
41 Instead of generating output files, parse the configuration
42 files and print some internal information about the device spec‐
43 ified in MAPPING.
44
46 There are 3 locations that netplan generate considers:
47
48 • /lib/netplan/*.yaml
49
50 • /etc/netplan/*.yaml
51
52 • /run/netplan/*.yaml
53
54 If there are multiple files with exactly the same name, then only one
55 will be read. A file in /run/netplan will shadow - completely replace
56 - a file with the same name in /etc/netplan. A file in /etc/netplan
57 will itself shadow a file in /lib/netplan.
58
59 Or in other words, /run/netplan is top priority, then /etc/netplan,
60 with /lib/netplan having the lowest priority.
61
62 If there are files with different names, then they are considered in
63 lexicographical order - regardless of the directory they are in. Later
64 files add to or override earlier files. For example, /run/net‐
65 plan/10-foo.yaml would be updated by /lib/netplan/20-abc.yaml.
66
67 If you have two files with the same key/setting, the following rules
68 apply:
69
70 • If the values are YAML boolean or scalar values (numbers and strings)
71 the old value is overwritten by the new value.
72
73 • If the values are sequences, the sequences are concatenated - the new
74 values are appended to the old list.
75
76 • If the values are mappings, netplan will examine the elements of the
77 mappings in turn using these rules.
78
80 netplan(5), netplan-apply(8), netplan-try(8), systemd-networkd(8), Net‐
81 workManager(8)
82
84 Daniel Axtens (<daniel.axtens@canonical.com>).
85
86
87
88 netplan-generate(8)