network/examples/network_state.yml
Wen Liang e694ad72c1 Support the nmstate network state configuration
The users want to apply the nmstate network state configuration to the
interface directly through the role, which necessitates the less
complexity of the network configuration and allows the partial
configuration on the network.

To warrant that the users are capable to apply the nmstate network state
configuration, add the support for the `network_state` variable.

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2022-07-01 12:29:38 +02:00

51 lines
1.2 KiB
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- hosts: all
vars:
network_state:
interfaces:
- name: ethtest0
type: ethernet
state: up
ipv4:
enabled: true
address:
- ip: 192.168.122.250
prefix-length: 24
dhcp: false
ipv6:
enabled: true
address:
- ip: 2001:db8::1:1
prefix-length: 64
autoconf: false
dhcp: false
- name: ethtest1
type: ethernet
state: up
ipv4:
enabled: true
auto-dns: false
dhcp: true
ipv6:
enabled: true
auto-dns: false
dhcp: true
routes:
config:
- destination: 192.0.2.100/30
metric: 150
next-hop-address: 192.168.122.250
next-hop-interface: ethtest0
table-id: 254
dns-resolver:
config:
search:
- example.com
- example.org
server:
- 2001:4860:4860::8888
- 8.8.8.8
roles:
- linux-system-roles.network
...