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