Files
2026-02-21 16:54:18 +01:00

17 lines
748 B
YAML

---
- name: Create bridge
community.routeros.command:
commands:
- /interface bridge add name="bridge-{{ gateway_config.lab_name }}" protocol-mode=none
- name: Add interfaces to bridge
community.routeros.command:
commands:
- /interface bridge port add bridge="bridge-{{ gateway_config.lab_name }}" interface="vxlan{{ gateway_config.vni }}"
- /interface bridge port add bridge="bridge-{{ gateway_config.lab_name }}" interface="{{ gateway_config.lab_if }}"
- name: Configure bridge IP
community.routeros.command:
commands:
- /ip address add address={{ gateway_config.subnet | ipaddr('1') | ipaddr('address') }}/{{ gateway_config.subnet | ipaddr('prefix') }} interface="bridge-{{ gateway_config.lab_name }}"