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
|
||||
service: enabled=no
|
||||
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
|
||||
service: name=dhcpd
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
mode=0644
|
||||
when: discovered_wireless_iface is defined
|
||||
|
||||
- name: Enable the Access Point 'hostapd' service
|
||||
service: enabled=yes
|
||||
- name: Disable the Access Point 'hostapd' service
|
||||
service: enabled=no
|
||||
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
|
||||
template: src=hostapd/hostapd.service.j2
|
||||
|
@ -25,6 +25,7 @@
|
|||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
when: hostapd_enabled
|
||||
|
||||
- name: Use custom iiab-hotspot-on
|
||||
template: src=network/iiab-hotspot-on
|
||||
|
|
|
@ -8,18 +8,12 @@
|
|||
- network
|
||||
- network-discover
|
||||
|
||||
- include_tasks: hostapd.yml
|
||||
tags:
|
||||
- network
|
||||
- AP
|
||||
|
||||
- name: RPi hack for AP post install via wifi so the services are right
|
||||
set_fact:
|
||||
no_net_restart: True
|
||||
hostapd_enabled: False
|
||||
iiab_lan_iface: br0
|
||||
iiab_wan_iface: "{{ discovered_wired_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
|
||||
|
||||
- include_tasks: computed_network.yml
|
||||
|
@ -28,6 +22,17 @@
|
|||
- network
|
||||
- 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 #####
|
||||
#- include_tasks: static.yml
|
||||
# when: 'iiab_wan_iface != "none" and wan_ip != "dhcp"'
|
||||
|
@ -46,15 +51,15 @@
|
|||
|
||||
- name: (Re)Installing named
|
||||
include_tasks: named.yml
|
||||
when: FQDN_changed and iiab_stage|int = 9
|
||||
when: FQDN_changed and iiab_stage|int == 9
|
||||
|
||||
- name: (Re)Installing dhcpd
|
||||
include_tasks: dhcpd.yml
|
||||
when: FQDN_changed and iiab_stage|int = 9
|
||||
when: FQDN_changed and iiab_stage|int == 9
|
||||
|
||||
- name: (Re)Installing Squid
|
||||
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
|
||||
- include_tasks: avahi.yml
|
||||
|
@ -68,7 +73,7 @@
|
|||
- dhcpd
|
||||
- dnsmasq
|
||||
- squid
|
||||
|
||||
|
||||
- include_tasks: enable_services.yml
|
||||
tags:
|
||||
- network
|
||||
|
@ -123,3 +128,4 @@
|
|||
- dhcpd
|
||||
- dnsmasq
|
||||
- squid
|
||||
- AP
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
################# LANCONTROLLER ###################
|
||||
auto br0
|
||||
iface br0 inet manual
|
||||
#{% if iiab_wireless_lan_iface is defined %}{{ iiab_wireless_lan_iface }}{% endif %}
|
||||
{% if iiab_wired_lan_iface is defined %}
|
||||
bridge_ports {{ iiab_wired_lan_iface }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue