Initial commit
This commit is contained in:
16
ansible/roles/mikrotik-bridge/tasks/main.yml
Normal file
16
ansible/roles/mikrotik-bridge/tasks/main.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- 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 }}"
|
||||
Reference in New Issue
Block a user