From 73b6937c8e844a6fd190d02fe0950cc5bd1832dd Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Wed, 1 Nov 2017 15:43:19 -0500 Subject: [PATCH] re-enable bridging for non-RPi --- roles/network/tasks/detected_network.yml | 39 ++++++++++++------------ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/roles/network/tasks/detected_network.yml b/roles/network/tasks/detected_network.yml index 023c85c73..efd822956 100644 --- a/roles/network/tasks/detected_network.yml +++ b/roles/network/tasks/detected_network.yml @@ -141,33 +141,32 @@ # moved to detected_redhat # use value only if present -- name: Setting wired LAN as only interface +- name: For Debian, always use bridging - except RPi + set_fact: + iiab_lan_iface: br0 + when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "1" and is_debuntu' and not is_rpi + +- name: WiFi is on the LAN - use bridging - except RPi + set_fact: + iiab_lan_iface: br0 + when: iiab_wireless_lan_iface != "none" and not is_rpi + +- name: Setting wired LAN as only interface - RPi set_fact: iiab_lan_iface: "{{ iiab_wired_lan_iface }}" - when: iiab_wired_lan_iface is defined and num_lan_interfaces == "1" + when: iiab_wired_lan_iface is defined and num_lan_interfaces == "1" and is_rpi -- name: Setting wireless LAN as only interface +- name: Setting wireless LAN as only interface - RPi set_fact: iiab_lan_iface: "{{ iiab_wireless_lan_iface }}" - when: iiab_wireless_lan_iface is defined and num_lan_interfaces == "1" + when: iiab_wireless_lan_iface is defined and num_lan_interfaces == "1" and is_rpi -# big hammer for now -#- name: For Debian, always use bridging -# set_fact: -# iiab_lan_iface: br0 -# when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "1" and is_debuntu' +- name: 2 or more devices on the LAN - use bridging + set_fact: + iiab_lan_iface: br0 + when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "2" and not is_rpi' -#- name: 2 or more devices on the LAN - use bridging -# set_fact: -# iiab_lan_iface: br0 -# when: 'discovered_lan_iface != "none" and num_lan_interfaces >= "2" and not is_debian' - -#- name: WiFi is on the LAN - use bridging -# set_fact: -# iiab_lan_iface: br0 -# when: iiab_wireless_lan_iface != "none" - -- name: in VM disable bridging +- name: in VM disable LAN - needs local_vars entry to activate set_fact: iiab_lan_iface: none when: is_VM is defined