Syntax for specifying an interface by name is too verbose/redundant
Bug #1782229 reported by
Mike Pontillo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Given the following Netplan syntax, whereby I only need to know that an interface by the name `ens3` exists:
"""
network:
version: 2
renderer: networkd
ethernets:
ens3:
match:
name: ens3
bridges:
br0:
interfaces: [ens3]
dhcp4: true
"""
... it would be nice to be able to use a less verbose syntax. For example, it would be nice if the following syntax were equivalent to the above:
"""
network:
version: 2
renderer: networkd
ethernets:
ens3: {}
bridges:
br0:
interfaces: [ens3]
dhcp4: true
"""
description: | updated |
summary: |
- Syntax for specifying an interface by name is redundant + Syntax for specifying an interface by name is too verbose/redundant |
To post a comment you must log in.
Actually, this seems like it's maybe just a documentation bug. I tried this just now and it worked. ;-)
Here's my working config:
"""
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: yes
ens9: {}
bridges:
br0:
interfaces: [ens9]
addresses:
- 172.16.99.10/24
"""
I guess if the dictionary key is an interface name, netplan considers it a match-by-name by default..?