1netplan-generate(8)                                        netplan-generate(8)
2
3
4

NAME

6       netplan-generate  -  generate  backend  configuration from netplan YAML
7       files
8

SYNOPSIS

10       netplan [–debug] generate -h | –help
11
12       netplan [–debug] generate [–root-dir ROOT_DIR] [–mapping MAPPING]
13

DESCRIPTION

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

OPTIONS

30       -h, –help
31              Print basic help.
32
33       –debug Print debugging output during the process.
34
35       –root-dir ROOT_DIR
36              Instead  of   looking   in   /{lib,etc,run}/netplan,   look   in
37              /ROOT_DIR/{lib,etc,run}/netplan
38
39       –mapping MAPPING
40              Instead  of  generating  output  files,  parse the configuration
41              files and print some internal information about the device spec‐
42              ified in MAPPING.
43

HANDLING MULTIPLE FILES

45       There are 3 locations that netplan generate considers:
46
47       • /lib/netplan/*.yaml
48
49       • /etc/netplan/*.yaml
50
51       • /run/netplan/*.yaml
52
53       If  there  are multiple files with exactly the same name, then only one
54       will be read.  A file in /run/netplan will shadow - completely  replace
55       -  a  file  with the same name in /etc/netplan.  A file in /etc/netplan
56       will itself shadow a file in /lib/netplan.
57
58       Or in other words, /run/netplan is  top  priority,  then  /etc/netplan,
59       with /lib/netplan having the lowest priority.
60
61       If  there  are  files with different names, then they are considered in
62       lexicographical order - regardless of the directory they are in.  Later
63       files  add  to  or  override  earlier  files.   For  example, /run/net‐
64       plan/10-foo.yaml would be updated by /lib/netplan/20-abc.yaml.
65
66       If you have two files with the same key/setting,  the  following  rules
67       apply:
68
69       • If the values are YAML boolean or scalar values (numbers and strings)
70         the old value is overwritten by the new value.
71
72       • If the values are sequences, the sequences are concatenated - the new
73         values are appended to the old list.
74
75       • If  the values are mappings, netplan will examine the elements of the
76         mappings in turn using these rules.
77

SEE ALSO

79       netplan(5), netplan-apply(8), netplan-try(8), systemd-networkd(8), Net‐
80       workManager(8)
81

AUTHORS

83       Daniel Axtens (<daniel.axtens@canonical.com>).
84
85
86
87                                                           netplan-generate(8)
Impressum