mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Enable manually_toggle_AP when WiFi is primary gateway
This commit is contained in:
parent
cbc8ec3f44
commit
c412f02f70
1 changed files with 45 additions and 37 deletions
|
@ -1,23 +1,27 @@
|
||||||
|
|
||||||
#- include_vars: roles/network/defaults/main.yml
|
#- include_vars: roles/network/defaults/main.yml
|
||||||
#- include_vars: vars/local_vars.yml
|
#- include_vars: vars/local_vars.yml
|
||||||
|
|
||||||
- include_tasks: detected_network.yml
|
- include_tasks: detected_network.yml
|
||||||
when: not installing
|
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network #REMOVE SUCH LINES (BELOW TOO) AS WE'RE IN "network" ?
|
||||||
- network-discover
|
- network-discover
|
||||||
|
|
||||||
|
- name: Enable manually_toggle_AP if WiFi is primary gateway
|
||||||
|
set_fact:
|
||||||
|
manually_toggle_AP: true
|
||||||
|
when: discovered_wireless_iface == iiab_wan_iface
|
||||||
|
|
||||||
- name: RPi - reboot to AP post install - installed via wifi so the services are ready
|
- name: RPi - reboot to AP post install - installed via wifi so the services are ready
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_lan_iface: br0
|
iiab_lan_iface: br0
|
||||||
iiab_wan_iface: "{{ discovered_wired_iface }}"
|
iiab_wan_iface: "{{ discovered_wired_iface }}"
|
||||||
iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
|
iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
|
||||||
iiab_wired_lan_iface: ""
|
iiab_wired_lan_iface: ""
|
||||||
when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface and reboot_to_AP
|
when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface and reboot_to_AP
|
||||||
|
|
||||||
- include_tasks: computed_network.yml
|
- include_tasks: computed_network.yml
|
||||||
when: not installing
|
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
- network-discover
|
- network-discover
|
||||||
|
@ -29,8 +33,8 @@
|
||||||
|
|
||||||
- name: RPi - don't reboot to AP post install - installed via wifi - don't blow away current network
|
- name: RPi - don't reboot to AP post install - installed via wifi - don't blow away current network
|
||||||
set_fact:
|
set_fact:
|
||||||
no_net_restart: True
|
no_net_restart: True
|
||||||
hostapd_enabled: False
|
hostapd_enabled: False
|
||||||
when: is_rpi and discovered_wireless_iface is defined and discovered_wired_iface != iiab_wan_iface
|
when: is_rpi and discovered_wireless_iface is defined and discovered_wired_iface != iiab_wan_iface
|
||||||
|
|
||||||
##### Start static ip address info for first run #####
|
##### Start static ip address info for first run #####
|
||||||
|
@ -47,7 +51,9 @@
|
||||||
- name: Configuring wondershaper
|
- name: Configuring wondershaper
|
||||||
include_tasks: wondershaper.yml
|
include_tasks: wondershaper.yml
|
||||||
when: wondershaper_install
|
when: wondershaper_install
|
||||||
tags: wondershaper, network
|
tags:
|
||||||
|
- network
|
||||||
|
- wondershaper
|
||||||
|
|
||||||
- name: (Re)Installing named
|
- name: (Re)Installing named
|
||||||
include_tasks: named.yml
|
include_tasks: named.yml
|
||||||
|
@ -86,64 +92,66 @@
|
||||||
#### Start network layout
|
#### Start network layout
|
||||||
- name: Redhat networking
|
- name: Redhat networking
|
||||||
include_tasks: ifcfg_mods.yml
|
include_tasks: ifcfg_mods.yml
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
when: is_redhat and not installing
|
when: is_redhat and not installing
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
|
||||||
- name: NetworkManager in use
|
- name: NetworkManager in use
|
||||||
include_tasks: NM-debian.yml
|
include_tasks: NM-debian.yml
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
when: is_debuntu and network_manager_active
|
when: is_debuntu and network_manager_active
|
||||||
#and not installing
|
#and not installing
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
|
||||||
- name: systemd-networkd in use
|
- name: systemd-networkd in use
|
||||||
include_tasks: sysd-netd-debian.yml
|
include_tasks: sysd-netd-debian.yml
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
when: is_debuntu and systemd_networkd_active
|
when: is_debuntu and systemd_networkd_active
|
||||||
#and not installing
|
#and not installing
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
|
||||||
- name: RPi's have dhcpcd in use
|
- name: RPi's have dhcpcd in use
|
||||||
include_tasks: rpi_debian.yml
|
include_tasks: rpi_debian.yml
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
when: is_debuntu and is_rpi
|
when: is_debuntu and is_rpi
|
||||||
#and not installing
|
#and not installing
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
|
||||||
- name: Not RPi, Not NetworkManager, Not systemd-networkd in use
|
- name: Not RPi, Not NetworkManager, Not systemd-networkd in use
|
||||||
include_tasks: debian.yml
|
include_tasks: debian.yml
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
when: not is_rpi and not network_manager_active and not systemd_networkd_active and is_debuntu
|
when: not is_rpi and not network_manager_active and not systemd_networkd_active and is_debuntu
|
||||||
#and not installing
|
#and not installing
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
|
||||||
# this is moving
|
# this is moving
|
||||||
- name: Record iiab_wan_device
|
- name: Record iiab_wan_device
|
||||||
lineinfile: dest=/etc/iiab/iiab.env
|
lineinfile:
|
||||||
regexp='^IIAB_WAN_DEVICE=*'
|
dest: /etc/iiab/iiab.env
|
||||||
line='IIAB_WAN_DEVICE="{{ iiab_wan_iface }}"'
|
regexp: '^IIAB_WAN_DEVICE=*'
|
||||||
state=present
|
line: 'IIAB_WAN_DEVICE="{{ iiab_wan_iface }}"'
|
||||||
|
state: present
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
- name: Record iiab_lan_device
|
- name: Record iiab_lan_device
|
||||||
lineinfile: dest=/etc/iiab/iiab.env
|
lineinfile:
|
||||||
regexp='^IIAB_LAN_DEVICE=*'
|
dest: /etc/iiab/iiab.env
|
||||||
line='IIAB_LAN_DEVICE="{{ iiab_lan_iface }}"'
|
regexp: '^IIAB_LAN_DEVICE=*'
|
||||||
state=present
|
line: 'IIAB_LAN_DEVICE="{{ iiab_lan_iface }}"'
|
||||||
|
state: present
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
#### end network layout
|
#### end network layout
|
||||||
- include_tasks: restart.yml
|
- include_tasks: restart.yml
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
- named
|
- named
|
||||||
- dhcpd
|
- dhcpd
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- squid
|
- squid
|
||||||
- AP
|
- AP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue