1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

restore bridging for RPi and make optional

This commit is contained in:
Jerry Vonau 2017-11-05 11:59:57 -05:00
parent a45389ff41
commit 78a9434122
4 changed files with 24 additions and 5 deletions

View file

@ -34,7 +34,8 @@
set_fact: set_fact:
rpi_model: "rpi" rpi_model: "rpi"
is_rpi: True is_rpi: True
no_net_restart: True # no_net_restart: True
# nobridge: True
when: ansible_local.local_facts.os == "raspbian" when: ansible_local.local_facts.os == "raspbian"
- name: Set exFAT enabled for XO laptops - name: Set exFAT enabled for XO laptops

View file

@ -39,6 +39,11 @@
src=network/systemd.j2 src=network/systemd.j2
when: not is_rpi and (iiab_lan_iface == "br0" or wan_ip != "dhcp") when: not is_rpi and (iiab_lan_iface == "br0" or wan_ip != "dhcp")
- name: Copy the bridge script for RPi
template: dest=/etc/network/interfaces.d/iiab
src=network/rpi.j2
when: is_rpi and iiab_lan_iface == "br0"
- name: bind may be affected - name: bind may be affected
service: name={{ dns_service }} state=stopped service: name={{ dns_service }} state=stopped
when: named_install and dnsmasq_enabled when: named_install and dnsmasq_enabled
@ -62,7 +67,7 @@
- name: restart the networking service - name: restart the networking service
service: name=networking state=restarted service: name=networking state=restarted
when: not no_net_restart when: not nobridge is defined and not no_net_restart
- name: restart hostapd when wifi is present - name: restart hostapd when wifi is present
service: name=hostapd state=restarted service: name=hostapd state=restarted

View file

@ -154,17 +154,17 @@
- name: WiFi is on the LAN - use bridging - except RPi - name: WiFi is on the LAN - use bridging - except RPi
set_fact: set_fact:
iiab_lan_iface: br0 iiab_lan_iface: br0
when: not is_rpi and iiab_wireless_lan_iface is defined when: iiab_wireless_lan_iface is defined and not nobridge is defined
- name: Setting wired LAN as only interface - RPi - name: Setting wired LAN as only interface - RPi
set_fact: set_fact:
iiab_lan_iface: "{{ iiab_wired_lan_iface }}" iiab_lan_iface: "{{ iiab_wired_lan_iface }}"
when: is_rpi and iiab_wired_lan_iface is defined when: iiab_wired_lan_iface is defined and nobridge is defined
- name: Setting wireless LAN as only interface - RPi - name: Setting wireless LAN as only interface - RPi
set_fact: set_fact:
iiab_lan_iface: "{{ iiab_wireless_lan_iface }}" iiab_lan_iface: "{{ iiab_wireless_lan_iface }}"
when: is_rpi and iiab_wireless_lan_iface is defined when: iiab_wireless_lan_iface is defined and nobridge is defined
- name: in VM disable LAN - needs local_vars entry to activate - name: in VM disable LAN - needs local_vars entry to activate
set_fact: set_fact:

View file

@ -0,0 +1,13 @@
# iiab_network_mode is {{ iiab_network_mode }}
# gui_desired_network_role is {{ gui_desired_network_role }}
{% if iiab_network_mode != "Appliance" %}
################# LANCONTROLLER ###################
auto br0
iface br0 inet manual
bridge_ports {% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }} {% endif %} {% if iiab_wired_lan_iface is defined %} {{ iiab_wired_lan_iface }} {% endif %}
bridge_maxwait 0
dns-nameservers 127.0.0.1
dns-search {{ iiab_domain }}
{% endif %}
{# end LANCONTROLLER #}