mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
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>
17 lines
318 B
YAML
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
|
|
...
|