network/examples/match_path_support.yml
Wen Liang 9fd19afa25 Allow configuring network connection via matching path
Users can easily configure or update network connection via matching
physical device path of the interface, which add certain flexibilty of
user experience.

Update connection profile via matching `path` setting:

```yaml
  - name: eth0
    type: ethernet
    autoconnect: yes
    # For PCI devices, the path has the form "pci-$domain:$bus:$device.$function"
    # It will only update the interface with the path "pci-0000:00:03.0"
    match:
      path:
        - pci-0000:00:03.0
```

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2021-10-06 18:22:42 +08:00

17 lines
318 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- hosts: all
vars:
network_connections:
- name: eth0
type: ethernet
match:
path:
- pci-0000:00:03.0
ip:
dhcp4: no
address:
- 192.0.2.3/24
roles:
- linux-system-roles.network
...