DarkFeather 2022-05-11 17:20:57 -05:00
parent 51e2836378
commit 9758b23193
Signed by: DarkFeather
GPG Key ID: 1CC1E3F4ED06F296
3 changed files with 18 additions and 4 deletions

View File

@ -0,0 +1 @@
allow br0

View File

@ -10,7 +10,8 @@
package: package:
name: name:
- edk2-ovmf - edk2-ovmf
- qemu-headless - qemu-base
- qemu-emulators-full
- ddrescue - ddrescue
state: present state: present
@ -32,6 +33,7 @@
- name: QEMU Bridge Config - name: QEMU Bridge Config
become: yes become: yes
register: qemubr
copy: copy:
src: bridge.conf src: bridge.conf
dest: /etc/qemu/bridge.conf dest: /etc/qemu/bridge.conf
@ -41,9 +43,10 @@
- name: System bridge interface - name: System bridge interface
become: yes become: yes
when: qemubr.changed
register: br0 register: br0
copy: template:
src: br0 src: netctl-bridge.j2
dest: /etc/netctl/br0 dest: /etc/netctl/br0
owner: root owner: root
group: root group: root
@ -51,5 +54,10 @@
- name: Enable bridge - name: Enable bridge
become: yes become: yes
when: br0.changed when: qemubr.changed or br0.changed
command: "/bin/bash -l -c 'netctl enable br0 && netctl restart br0'" command: "/bin/bash -l -c 'netctl enable br0 && netctl restart br0'"
- name: Remind about restarting VMs
when: qemubr.changed or br0.changed
debug:
msg: You may need to restart VMs on the Node.

View File

@ -0,0 +1,5 @@
Description="Bridged Network Interface for VMs"
Interface=br0
Connection=bridge
BindsToInterfaces=({{ ipinterface }})
IP=dhcp