1
0
Fork 0
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:
A Holt 2017-12-28 18:57:22 -05:00 committed by GitHub
parent cbc8ec3f44
commit c412f02f70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,17 @@
#- 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
@ -17,7 +21,7 @@
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
@ -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,53 +92,55 @@
#### Start network layout #### Start network layout
- name: Redhat networking - name: Redhat networking
include_tasks: ifcfg_mods.yml include_tasks: ifcfg_mods.yml
when: is_redhat and not installing
tags: tags:
- network - network
when: is_redhat and not installing
- 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