Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 483  / 1 Year ago, tue, february 28, 2023, 3:26:47

I have the following question: how does sudo netplan apply work when it has several configuration files with different renderers: e.g. I have 2 config files in /etc/netplan:


01-network-manager.yaml


# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager

99_config.yaml


network:
version: 2
renderer: networkd
ethernets:

eno1:
addresses:
- 192.168.220.1/24

# 10Gbit - optical
enp3s0f0:
addresses:
- 192.168.1.20/24
gateway4: 192.168.1.1
nameservers:
addresses: [15.20.222.162]

# 10Gbit - optical
enp3s0f1:
link-local: [ ipv4 ]

According to the information I found online, there cannot be two renderers at the same time. Moreover, I found that sudo netplan apply will try to combine all the configuration files into one. So, how will this conflict resolve?


More From » networking

 Answers
6

The YAML that is processed later will win. It's that simple.


The files will be processed in alphanumeric numeric order (01- before 99_) during startup.


Therefore YAML in 01- will be processed first. But any fields that disagree will be superseded (or overridden) by YAML in 99_ . Any fields that don't disagree will remain.


In the specific example you offered, networkd will be the renderer.


[#281] Wednesday, March 1, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enytidge

Total Points: 169
Total Questions: 105
Total Answers: 107

Location: Papua New Guinea
Member since Tue, Aug 24, 2021
3 Years ago
enytidge questions
;