mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
commit
ace5321020
4 changed files with 17 additions and 2 deletions
|
@ -157,7 +157,7 @@
|
||||||
|
|
||||||
# so this works
|
# so this works
|
||||||
- name: Interface count
|
- name: Interface count
|
||||||
shell: ls /sys/class/net | grep -v -e lo | wc | awk '{print $1}'
|
shell: ls /sys/class/net | grep -v -e lo -e bridge0 -e veth -e "br-*" -e docker| wc | awk '{print $1}'
|
||||||
register: adapter_count
|
register: adapter_count
|
||||||
|
|
||||||
# well if there ever was a point to tell the user things are FUBAR this is it.
|
# well if there ever was a point to tell the user things are FUBAR this is it.
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
|
|
||||||
# LAN - pick non WAN's
|
# LAN - pick non WAN's
|
||||||
- name: Create list of LAN (non WAN) ifaces
|
- name: Create list of LAN (non WAN) ifaces
|
||||||
shell: ls /sys/class/net | grep -v -e wwlan -e ppp -e lo -e br0 -e tun -e {{ device_gw }} -e {{ ap_device }}
|
shell: ls /sys/class/net | grep -v -e wwlan -e ppp -e lo -e br0 -e tun -e "br-*" -e docker -e bridge0 -e veth -e {{ device_gw }} -e {{ ap_device }}
|
||||||
when: num_lan_interfaces != "0"
|
when: num_lan_interfaces != "0"
|
||||||
register: lan_list_result
|
register: lan_list_result
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,15 @@
|
||||||
dest: /etc/dnsmasq.d/iiab.conf
|
dest: /etc/dnsmasq.d/iiab.conf
|
||||||
when: dnsmasq_enabled and dnsmasq_install and (iiab_network_mode != "Appliance")
|
when: dnsmasq_enabled and dnsmasq_install and (iiab_network_mode != "Appliance")
|
||||||
|
|
||||||
|
- name: Copy script to restart dnsmasq whenever br0 comes up
|
||||||
|
template:
|
||||||
|
src: "roles/network/templates/network/dnsmasq.sh.j2"
|
||||||
|
dest: "/etc/networkd-dispatcher/routable.d/dnsmasq.sh"
|
||||||
|
mode: "0755"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
when: dnsmasq_enabled and dnsmasq_install and (iiab_network_mode != "Appliance")
|
||||||
|
|
||||||
- name: Remove /etc/dnsmasq.d/iiab.conf, when not dnsmasq_enabled or is Appliance
|
- name: Remove /etc/dnsmasq.d/iiab.conf, when not dnsmasq_enabled or is Appliance
|
||||||
file:
|
file:
|
||||||
path: /etc/dnsmasq.d/iiab.conf
|
path: /etc/dnsmasq.d/iiab.conf
|
||||||
|
|
6
roles/network/templates/network/dnsmasq.sh.j2
Executable file
6
roles/network/templates/network/dnsmasq.sh.j2
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$IFACE" == "{{ iiab_lan_iface }}" ];
|
||||||
|
then
|
||||||
|
/bin/systemctl restart dnsmasq.service
|
||||||
|
fi
|
Loading…
Reference in a new issue