2 accesspoint_wifi_channels:
14 ssid: "TEST realstuff"
16 key: "{{ vault_accesspoint_zones.iot.key }}"
20 key: "{{ vault_accesspoint_zones.guests.key }}"
22 # ssid: "TEST r3members"
24 # key: "{{ vault_accesspoint_zones.members.key }}"
28 accesspoint_wired_interface: eth0
29 accesspoint_wireless_device_paths:
30 2.4g: "platform/qca956x_wmac"
31 5g: "pci0000:00/0000:00:00.0"
33 accesspoint_network_base:
34 - name: globals 'globals'
36 ula_prefix: "fc{{ '%02x:%04x:%04x' | format((255 | random(seed=inventory_hostname + '0')), (65535 | random(seed=inventory_hostname + '1')), (65535 | random(seed=inventory_hostname + '2'))) }}::/48"
38 - name: interface 'loopback'
45 - name: interface 'raw'
47 ifname: "{{ accesspoint_wired_interface }}"
51 - name: interface 'mgmt'
54 ifname: "{{ accesspoint_wired_interface }}.{{ net.mgmt.vlan }}"
57 ipaddr: "{{ net.mgmt.prefix | ipaddr(net.mgmt.offsets.accesspoints + groups.accesspoints.index(inventory_hostname)) | ipaddr('address') }}"
58 netmask: "{{ net.mgmt.prefix | ipaddr('netmask') }}"
59 gateway: "{{ net.mgmt.gw }}"
60 dns: "{{ net.mgmt.dns | join(' ') }}"
61 dns_search: realraum.at
63 accesspoint_network_zones: "{{ accesspoint_network_zones_yaml | from_yaml }}"
64 accesspoint_network_zones_yaml: |
65 {% for item in accesspoint_zones.keys() %}
66 - name: interface "{{ item }}"
69 ifname: "{{ accesspoint_wired_interface }}.{{ net[item].vlan }}"
75 accesspoint_wireless_devices:
76 - name: wifi-device 'radio5g'
79 channel: "{{ accesspoint_wifi_channels['5g'][inventory_hostname] }}"
82 path: "{{ accesspoint_wireless_device_paths['5g'] }}"
85 - name: wifi-device 'radio2g4'
88 channel: "{{ accesspoint_wifi_channels['2.4g'][inventory_hostname] }}"
91 path: "{{ accesspoint_wireless_device_paths['2.4g'] }}"
95 ## TODO: set up 802.11r see:
96 ## * https://www.reddit.com/r/openwrt/comments/515oea/finally_got_80211r_roaming_working/
97 ## * https://gist.github.com/lg/998d3e908d547bd9972a6bb604df377b
98 accesspoint_wireless_ifaces: "{{ accesspoint_wireless_ifaces_yaml | from_yaml }}"
99 accesspoint_wireless_ifaces_yaml: |
100 {% for item in accesspoint_zones.keys() %}
101 - name: wifi-iface '{{ item }}2g4only'
104 network: '{{ item }}'
106 disassoc_low_ack: '1'
108 ssid: '{{ accesspoint_zones[item].ssid }}2.4'
109 encryption: '{{ accesspoint_zones[item].encryption }}'
110 key: '{{ accesspoint_zones[item].key }}'
112 - name: wifi-iface '{{ item }}5gonly'
115 network: '{{ item }}'
117 disassoc_low_ack: '1'
119 ssid: '{{ accesspoint_zones[item].ssid }}5'
120 encryption: '{{ accesspoint_zones[item].encryption }}'
121 key: '{{ accesspoint_zones[item].key }}'
123 - name: wifi-iface '{{ item }}2g4'
126 network: '{{ item }}'
128 disassoc_low_ack: '1'
130 ssid: '{{ accesspoint_zones[item].ssid }}'
131 encryption: '{{ accesspoint_zones[item].encryption }}'
132 key: '{{ accesspoint_zones[item].key }}'
134 - name: wifi-iface '{{ item }}5g'
137 network: '{{ item }}'
139 disassoc_low_ack: '1'
141 ssid: '{{ accesspoint_zones[item].ssid }}'
142 encryption: '{{ accesspoint_zones[item].encryption }}'
143 key: '{{ accesspoint_zones[item].key }}'
148 openwrt_variant: openwrt
149 openwrt_release: 18.06.1
151 openwrt_target: generic
152 openwrt_profile: ubnt-unifiac-lite
153 openwrt_output_image_suffixes:
154 - "generic-{{ openwrt_profile }}-squashfs-sysupgrade.bin"
159 # Defaults are configured in /etc/sysctl.d/* and can be customized in this file
161 # disable IP forwarding, we don't need it since we are
162 # only an AP that bridges VLANs to Wifi SSIDs
163 net.ipv4.conf.default.forwarding=0
164 net.ipv4.conf.all.forwarding=0
165 net.ipv4.ip_forward=0
166 net.ipv6.conf.default.forwarding=0
167 net.ipv6.conf.all.forwarding=0
169 /etc/dropbear/authorized_keys:
171 {% for key in noc_ssh_keys %}
175 /root/.config/htop/htoprc:
177 # Beware! This file is rewritten by htop when settings are changed in the interface.
178 # The parser is also very primitive, and not human-friendly.
179 fields=0 48 17 18 38 39 40 2 46 47 49 1
183 hide_kernel_threads=1
184 hide_userland_threads=0
188 highlight_base_name=1
189 highlight_megabytes=1
194 cpu_count_from_zero=0
195 update_process_names=0
196 account_guest_in_cpu_meter=0
199 left_meters=AllCPUs Memory Swap
200 left_meter_modes=1 1 1
201 right_meters=Tasks LoadAverage Uptime
202 right_meter_modes=2 2 2
209 hostname: '{{ inventory_hostname }}'
210 timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
215 - name: timeserver 'ntp'
220 - '0.lede.pool.ntp.org'
221 - '1.lede.pool.ntp.org'
222 - '2.lede.pool.ntp.org'
223 - '3.lede.pool.ntp.org'
229 RootPasswordAuth: 'off'
232 network: "{{ accesspoint_network_base + accesspoint_network_zones }}"
233 wireless: "{{ accesspoint_wireless_devices + accesspoint_wireless_ifaces }}"