From f1e0b5f9bd3bd43066a4ea28afd14f28f75f366f Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 4 Nov 2020 18:25:36 +0100 Subject: [PATCH] add bridge management --- tasks/main.yml | 6 ++++++ templates/bridge.j2 | 1 + 2 files changed, 7 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 9181c0b..32e376b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -43,6 +43,12 @@ become: yes notify: bridge_enable +- name: enable bridge + systemd: + name: netctl@bridge.service + enables: true + become: yes + - name: disable dhcpcd systemd: name: dhcpcd # required. Name of the service. diff --git a/templates/bridge.j2 b/templates/bridge.j2 index 7368be6..4d1873a 100644 --- a/templates/bridge.j2 +++ b/templates/bridge.j2 @@ -2,6 +2,7 @@ Interface=br0 Connection=bridge BindsToInterfaces=({{ ansible_default_ipv4.interface }}) + MACAddress={{ ansible_default_ipv4.interface }} IP=dhcp ## Ignore (R)STP and immediately activate the bridge #SkipForwardingDelay=yes