Files
toallab-automation/roles/linux-system-roles.network/examples/bridge-with-vlan.yml
2020-08-17 12:06:41 -04:00

37 lines
826 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- hosts: network-test
vars:
network_connections:
# Create a bridge profile, which is the parent of VLAN.
- name: prod2
state: up
type: bridge
interface_name: bridge2
ip:
dhcp4: no
auto6: no
# enslave an ethernet to the bridge
- name: prod2-slave1
state: up
type: ethernet
interface_name: "{{ network_interface_name2 }}"
master: prod2
slave_type: bridge
# on top of it, create a VLAN with ID 100 and static
# addressing
- name: prod2.100
state: up
type: vlan
parent: prod2
vlan_id: 100
ip:
address:
- "192.0.2.{{ network_iphost }}/24"
roles:
- linux-system-roles.network