Cannot override nameservers, only append to list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
New
|
Undecided
|
Unassigned |
Bug Description
The netplan reference states:
> Lexicographically later files (regardless of in which directory they are)
> amend (new mapping keys) or override (same mapping keys) previous ones.
On a freshly installed Ubuntu 18.04 server on DigitalOcean, cloud-init creates a configuration file `/etc/netplan/
```
network:
ethernets:
eth0:
- 8.8.8.8
- 8.8.4.4
```
I created my own configuration file, with a lexicographically later name and the same mapping keys with different values:
```
network:
ethernets:
eth0:
- 9.9.9.9
```
The result was that `systemd-resolve --status` listed the union of the nameserver lists for `eth0` instead of only the latter ones. Thus while the mapping key was the same, the values didn't override the previous ones but amended them.
Some discussion at https:/