mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +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,13 +1,17 @@
|
|||
|
||||
#- include_vars: roles/network/defaults/main.yml
|
||||
#- include_vars: vars/local_vars.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:
|
||||
- network
|
||||
- network #REMOVE SUCH LINES (BELOW TOO) AS WE'RE IN "network" ?
|
||||
- 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
|
||||
set_fact:
|
||||
iiab_lan_iface: br0
|
||||
|
@ -17,7 +21,7 @@
|
|||
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
|
||||
when: not installing
|
||||
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
||||
tags:
|
||||
- network
|
||||
- network-discover
|
||||
|
@ -47,7 +51,9 @@
|
|||
- name: Configuring wondershaper
|
||||
include_tasks: wondershaper.yml
|
||||
when: wondershaper_install
|
||||
tags: wondershaper, network
|
||||
tags:
|
||||
- network
|
||||
- wondershaper
|
||||
|
||||
- name: (Re)Installing named
|
||||
include_tasks: named.yml
|
||||
|
@ -86,53 +92,55 @@
|
|||
#### Start network layout
|
||||
- name: Redhat networking
|
||||
include_tasks: ifcfg_mods.yml
|
||||
when: is_redhat and not installing
|
||||
tags:
|
||||
- network
|
||||
when: is_redhat and not installing
|
||||
|
||||
- name: NetworkManager in use
|
||||
include_tasks: NM-debian.yml
|
||||
tags:
|
||||
- network
|
||||
when: is_debuntu and network_manager_active
|
||||
#and not installing
|
||||
tags:
|
||||
- network
|
||||
|
||||
- name: systemd-networkd in use
|
||||
include_tasks: sysd-netd-debian.yml
|
||||
tags:
|
||||
- network
|
||||
when: is_debuntu and systemd_networkd_active
|
||||
#and not installing
|
||||
tags:
|
||||
- network
|
||||
|
||||
- name: RPi's have dhcpcd in use
|
||||
include_tasks: rpi_debian.yml
|
||||
tags:
|
||||
- network
|
||||
when: is_debuntu and is_rpi
|
||||
#and not installing
|
||||
tags:
|
||||
- network
|
||||
|
||||
- name: Not RPi, Not NetworkManager, Not systemd-networkd in use
|
||||
include_tasks: debian.yml
|
||||
tags:
|
||||
- network
|
||||
when: not is_rpi and not network_manager_active and not systemd_networkd_active and is_debuntu
|
||||
#and not installing
|
||||
tags:
|
||||
- network
|
||||
|
||||
# this is moving
|
||||
- name: Record iiab_wan_device
|
||||
lineinfile: dest=/etc/iiab/iiab.env
|
||||
regexp='^IIAB_WAN_DEVICE=*'
|
||||
line='IIAB_WAN_DEVICE="{{ iiab_wan_iface }}"'
|
||||
state=present
|
||||
lineinfile:
|
||||
dest: /etc/iiab/iiab.env
|
||||
regexp: '^IIAB_WAN_DEVICE=*'
|
||||
line: 'IIAB_WAN_DEVICE="{{ iiab_wan_iface }}"'
|
||||
state: present
|
||||
when: not installing
|
||||
tags:
|
||||
- network
|
||||
|
||||
- name: Record iiab_lan_device
|
||||
lineinfile: dest=/etc/iiab/iiab.env
|
||||
regexp='^IIAB_LAN_DEVICE=*'
|
||||
line='IIAB_LAN_DEVICE="{{ iiab_lan_iface }}"'
|
||||
state=present
|
||||
lineinfile:
|
||||
dest: /etc/iiab/iiab.env
|
||||
regexp: '^IIAB_LAN_DEVICE=*'
|
||||
line: 'IIAB_LAN_DEVICE="{{ iiab_lan_iface }}"'
|
||||
state: present
|
||||
when: not installing
|
||||
tags:
|
||||
- network
|
||||
|
|
Loading…
Reference in a new issue