1

I need help understanding the order in which the netplan config files are applied and, if possible, how to set a fallback config.

Scenario:

  • Let's say I have two config files, A and B.
  • Config files A and B both set the same ethernet interfaces in different ways. (different auth methods...)
  • Config A file name is : 01-config.yaml
  • Config B file name is : 99-config.yaml

Question:

  1. Which config file will be applied?
  2. Would config B work as a fallback if config A didn't work? Or the other way around? Or neither?
  3. I want to set a fallback config file in case the existing one(A) fails. Is that possible?

Thanks 🙏

0

2 Answers 2

4

A and B are not "separate" configs -- they are the building blocks of a single config.

They are cumulative. Example:

01-File:           02-File:
XYZ                XYZ
  Foo: True          Bar: [1,2,3]

Final config:
XYZ
  Foo: True
  Bar: [1,2,3]

The order of the files (01-99) is important when you have conflicting settings. Earlier settings are overwritten by later. This offers you the opportunity to override settings by placing a new file instead of editing the current files (much better for automated changes). Example:

01-File:           02-File:             03-File:
XYZ                XYZ                  XYZ
  Foo: True          Bar: [1,2,3]         Baz: Blue
  Baz: Green         Foo: False

Final config:
XYZ
  Foo: False
  Bar: [1,2,3]
  Baz: Blue
1
  • 1
    Thank you for explaining how it works. That helps a lot.
    – laxebisu
    Dec 20, 2022 at 1:58
0

you asked 3 questions ... instead of one. The simple respones look like

  1. 01-config.yaml will be applied.

  2. no

  3. no

it is a bit unclear what you really want to do. If you provide more infos you will get more quallified answers. Is this question targeting WLAN and multiple SSIDs?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .