1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #772 from jvonau/appl_mode

Remove br0 in Appliance Mode for NetworkManager (e.g. if no internal WiFi)
This commit is contained in:
A Holt 2018-05-03 10:53:25 -04:00 committed by GitHub
commit 9920c8a501
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 9 deletions

View file

@ -19,8 +19,8 @@ discovered_wired_iface: "none"
discovered_wireless_iface: "none" discovered_wireless_iface: "none"
#Redhat #Redhat
iiab_wired_lan_iface: "none" #iiab_wired_lan_iface: "none"
iiab_wireless_lan_iface: "none" #iiab_wireless_lan_iface: "none"
has_WAN: False has_WAN: False
has_ifcfg_gw: "none" has_ifcfg_gw: "none"
has_wifi_gw: "none" has_wifi_gw: "none"

View file

@ -18,6 +18,12 @@
src: network/bridge-br0 src: network/bridge-br0
mode: 0600 mode: 0600
- name: Remove br0 in Appliance Mode for NetworkManager
file:
dest: /etc/NetworkManager/system-connections/bridge-br0
state: absent
when: iiab_network_mode == "Appliance"
- name: Stop wpa_supplicant service - name: Stop wpa_supplicant service
service: service:
name: wpa_supplicant name: wpa_supplicant

View file

@ -23,6 +23,12 @@
state=stopped state=stopped
when: is_debuntu when: is_debuntu
- name: Disable stock dhcp_service ipv6
service: name={{ dhcp_service }}6
enabled=no
state=stopped
when: is_ubuntu_18
- name: Install systemd unit file to /etc/systemd/system/dhcpd.service - name: Install systemd unit file to /etc/systemd/system/dhcpd.service
template: src={{ item.src }} template: src={{ item.src }}
dest={{ item.dest }} dest={{ item.dest }}

View file

@ -3,21 +3,31 @@
template: template:
dest: /etc/systemd/network/IIAB-Bridge.netdev dest: /etc/systemd/network/IIAB-Bridge.netdev
src: network/systemd-br0.j2 src: network/systemd-br0.j2
when: iiab_lan_iface == "br0"
- name: Copy the bridge script - Assigns IP address - name: Copy the bridge script - Assigns IP address
template: template:
dest: /etc/systemd/network/IIAB-Bridge.network dest: /etc/systemd/network/IIAB-Bridge.network
src: network/systemd-br0-network.j2 src: network/systemd-br0-network.j2
when: iiab_lan_iface == "br0"
- name: Copy the bridge script - Assigns br0 wired slaves - name: Copy the bridge script - Assigns br0 wired slaves
template: template:
dest: /etc/systemd/network/IIAB-Slave.network dest: /etc/systemd/network/IIAB-Slave.network
src: network/systemd-br0-slave.j2 src: network/systemd-br0-slave.j2
when: iiab_wired_lan_iface is defined when: iiab_wired_lan_iface is defined and iiab_lan_iface == "br0"
- name: Stopping services - name: Stopping services
include_tasks: down-debian.yml include_tasks: down-debian.yml
- name: Disable and mask systemd-networkd-wait-online
systemd:
name: systemd-networkd-wait-online
enabled: no
masked: yes
state: stopped
when: is_ubuntu_18
- name: Reload systemd - name: Reload systemd
systemd: systemd:
daemon_reload: yes daemon_reload: yes

View file

@ -1,6 +1,7 @@
[Unit] [Unit]
Description=DHCPv4 Server Daemon Description=DHCPv4 Server Daemon
After=rc-local.service After=multi-user.target
Requires=multi-user.target
[Service] [Service]
EnvironmentFile=/etc/sysconfig/dhcpd EnvironmentFile=/etc/sysconfig/dhcpd

View file

@ -3,13 +3,9 @@
Name=br0 Name=br0
[Network] [Network]
Bridge=br0 Address={{ lan_ip }}/19
LinkLocalAddressing=no LinkLocalAddressing=no
DNS={{ lan_ip }} DNS={{ lan_ip }}
Domains={{ iiab_domain }} Domains={{ iiab_domain }}
[Address]
Address={{ lan_ip }}/19
[Route]
Gateway=""