1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00

Merge pull request #1765 from m-anish/dnsmasq-fix

Dnsmasq fixes
This commit is contained in:
A Holt 2019-06-23 05:26:38 -04:00 committed by GitHub
commit ace5321020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 2 deletions

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,6 @@
#!/bin/bash
if [ "$IFACE" == "{{ iiab_lan_iface }}" ];
then
/bin/systemctl restart dnsmasq.service
fi