mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
partial 831e189795bf37d6c785a657a882556c3d649294
This commit is contained in:
parent
61228a188e
commit
20398be41a
4 changed files with 23 additions and 16 deletions
|
@ -1,7 +1,8 @@
|
||||||
- name: Disable the Access Point 'hostapd' service
|
- name: Disable the Access Point 'hostapd' service
|
||||||
service: enabled=no
|
service: enabled=no
|
||||||
name=hostapd.service
|
name=hostapd.service
|
||||||
when: not iiab_wireless_lan_iface is defined or iiab_network_mode == "Appliance" or not hostapd_enabled
|
when: not iiab_wireless_lan_iface is defined or iiab_network_mode == "Appliance"
|
||||||
|
#or not hostapd_enabled
|
||||||
|
|
||||||
- name: Disable dhcpd service
|
- name: Disable dhcpd service
|
||||||
service: name=dhcpd
|
service: name=dhcpd
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
mode=0644
|
mode=0644
|
||||||
when: discovered_wireless_iface is defined
|
when: discovered_wireless_iface is defined
|
||||||
|
|
||||||
- name: Enable the Access Point 'hostapd' service
|
- name: Disable the Access Point 'hostapd' service
|
||||||
service: enabled=yes
|
service: enabled=no
|
||||||
name=hostapd.service
|
name=hostapd.service
|
||||||
when: iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance" and hostapd_enabled
|
when: not hostapd_enabled
|
||||||
|
|
||||||
- name: Use custom systemd unit file to start 'hostapd' service
|
- name: Use custom systemd unit file to start 'hostapd' service
|
||||||
template: src=hostapd/hostapd.service.j2
|
template: src=hostapd/hostapd.service.j2
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
owner=root
|
owner=root
|
||||||
group=root
|
group=root
|
||||||
mode=0644
|
mode=0644
|
||||||
|
when: hostapd_enabled
|
||||||
|
|
||||||
- name: Use custom iiab-hotspot-on
|
- name: Use custom iiab-hotspot-on
|
||||||
template: src=network/iiab-hotspot-on
|
template: src=network/iiab-hotspot-on
|
||||||
|
|
|
@ -8,18 +8,12 @@
|
||||||
- network
|
- network
|
||||||
- network-discover
|
- network-discover
|
||||||
|
|
||||||
- include_tasks: hostapd.yml
|
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
- AP
|
|
||||||
|
|
||||||
- name: RPi hack for AP post install via wifi so the services are right
|
- name: RPi hack for AP post install via wifi so the services are right
|
||||||
set_fact:
|
set_fact:
|
||||||
no_net_restart: True
|
|
||||||
hostapd_enabled: False
|
|
||||||
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: ""
|
||||||
when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface
|
when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface
|
||||||
|
|
||||||
- include_tasks: computed_network.yml
|
- include_tasks: computed_network.yml
|
||||||
|
@ -28,6 +22,17 @@
|
||||||
- network
|
- network
|
||||||
- network-discover
|
- network-discover
|
||||||
|
|
||||||
|
- include_tasks: hostapd.yml
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
- AP
|
||||||
|
|
||||||
|
- name: RPi hack for AP post install via wifi don't blow away current network
|
||||||
|
set_fact:
|
||||||
|
no_net_restart: True
|
||||||
|
hostapd_enabled: False
|
||||||
|
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 #####
|
||||||
#- include_tasks: static.yml
|
#- include_tasks: static.yml
|
||||||
# when: 'iiab_wan_iface != "none" and wan_ip != "dhcp"'
|
# when: 'iiab_wan_iface != "none" and wan_ip != "dhcp"'
|
||||||
|
@ -46,15 +51,15 @@
|
||||||
|
|
||||||
- name: (Re)Installing named
|
- name: (Re)Installing named
|
||||||
include_tasks: named.yml
|
include_tasks: named.yml
|
||||||
when: FQDN_changed and iiab_stage|int = 9
|
when: FQDN_changed and iiab_stage|int == 9
|
||||||
|
|
||||||
- name: (Re)Installing dhcpd
|
- name: (Re)Installing dhcpd
|
||||||
include_tasks: dhcpd.yml
|
include_tasks: dhcpd.yml
|
||||||
when: FQDN_changed and iiab_stage|int = 9
|
when: FQDN_changed and iiab_stage|int == 9
|
||||||
|
|
||||||
- name: (Re)Installing Squid
|
- name: (Re)Installing Squid
|
||||||
include_tasks: squid.yml
|
include_tasks: squid.yml
|
||||||
when: FQDN_changed and squid_install and iiab_stage|int = 9
|
when: FQDN_changed and squid_install and iiab_stage|int == 9
|
||||||
|
|
||||||
#### start services
|
#### start services
|
||||||
- include_tasks: avahi.yml
|
- include_tasks: avahi.yml
|
||||||
|
@ -68,7 +73,7 @@
|
||||||
- dhcpd
|
- dhcpd
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- squid
|
- squid
|
||||||
|
|
||||||
- include_tasks: enable_services.yml
|
- include_tasks: enable_services.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
@ -123,3 +128,4 @@
|
||||||
- dhcpd
|
- dhcpd
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- squid
|
- squid
|
||||||
|
- AP
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
################# LANCONTROLLER ###################
|
################# LANCONTROLLER ###################
|
||||||
auto br0
|
auto br0
|
||||||
iface br0 inet manual
|
iface br0 inet manual
|
||||||
#{% if iiab_wireless_lan_iface is defined %}{{ iiab_wireless_lan_iface }}{% endif %}
|
|
||||||
{% if iiab_wired_lan_iface is defined %}
|
{% if iiab_wired_lan_iface is defined %}
|
||||||
bridge_ports {{ iiab_wired_lan_iface }}
|
bridge_ports {{ iiab_wired_lan_iface }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue