6 accesspoint_wifi_channels:
20 key: "{{ vault_accesspoint_zones.iot.key }}"
24 key: "{{ vault_accesspoint_zones.guests.key }}"
31 # key: "{{ vault_accesspoint_zones.members.key }}"
33 # disassoc_low_ack: '1'
38 accesspoint_wired_interface: eth0
39 accesspoint_wireless_device_paths:
40 2.4g: "platform/qca956x_wmac"
41 5g: "pci0000:00/0000:00:00.0"
43 accesspoint_network_base:
44 - name: globals 'globals'
46 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"
48 - name: interface 'loopback'
55 - name: interface 'raw'
57 ifname: "{{ accesspoint_wired_interface }}"
61 - name: interface 'mgmt'
64 ifname: "{{ accesspoint_wired_interface }}.{{ net.mgmt.vlan }}"
67 ipaddr: "{{ net.mgmt.prefix | ipaddr(net.mgmt.offsets.accesspoints + groups.accesspoints.index(inventory_hostname)) | ipaddr('address') }}"
68 netmask: "{{ net.mgmt.prefix | ipaddr('netmask') }}"
69 gateway: "{{ net.mgmt.gw }}"
70 dns: "{{ net.mgmt.dns | join(' ') }}"
71 dns_search: realraum.at
73 accesspoint_network_zones: "{{ accesspoint_network_zones_yaml | from_yaml }}"
74 accesspoint_network_zones_yaml: |
75 {% for item in accesspoint_zones.keys() %}
76 - name: interface "{{ item }}"
79 ifname: "{{ accesspoint_wired_interface }}.{{ net[item].vlan }}"
85 accesspoint_wireless_devices:
86 - name: wifi-device 'radio5g'
89 channel: "{{ accesspoint_wifi_channels['5g'][inventory_hostname] }}"
92 path: "{{ accesspoint_wireless_device_paths['5g'] }}"
95 - name: wifi-device 'radio2g4'
98 channel: "{{ accesspoint_wifi_channels['2.4g'][inventory_hostname] }}"
101 path: "{{ accesspoint_wireless_device_paths['2.4g'] }}"
105 ## TODO: set up 802.11r see:
106 ## * https://www.reddit.com/r/openwrt/comments/515oea/finally_got_80211r_roaming_working/
107 ## * https://gist.github.com/lg/998d3e908d547bd9972a6bb604df377b
108 accesspoint_wireless_ifaces: "{{ accesspoint_wireless_ifaces_yaml | from_yaml }}"
109 accesspoint_wireless_types:
110 - { name: only, ssid: 2.4, freq: 2g4 }
111 - { name: only, ssid: 5, freq: 5g }
112 - { name: '', ssid: '', freq: 2g4 }
113 - { name: '', ssid: '', freq: 5g }
114 accesspoint_wireless_ifaces_yaml: |
115 {% for zone in accesspoint_zones.keys() %}
116 {% for item in accesspoint_wireless_types %}
117 - name: wifi-iface '{{ zone }}{{ item.freq }}{{ item.name }}'
119 device: 'radio{{ item.freq }}'
120 network: '{{ zone }}'
122 ssid: '{{ accesspoint_zones[zone].ssid }}{{ item.ssid }}'
123 encryption: '{{ accesspoint_zones[zone].encryption }}'
124 key: '{{ accesspoint_zones[zone].key }}'
125 {% for opt, val in (accesspoint_zones[zone].extra_options | default({}) ).items() %}
126 {{ opt }}: '{{ val }}'
133 openwrt_variant: openwrt
134 openwrt_release: 18.06.1
136 openwrt_target: generic
137 openwrt_profile: ubnt-unifiac-lite
138 openwrt_output_image_suffixes:
139 - "generic-{{ openwrt_profile }}-squashfs-sysupgrade.bin"
144 # Defaults are configured in /etc/sysctl.d/* and can be customized in this file
146 # disable IP forwarding, we don't need it since we are
147 # only an AP that bridges VLANs to Wifi SSIDs
148 net.ipv4.conf.default.forwarding=0
149 net.ipv4.conf.all.forwarding=0
150 net.ipv4.ip_forward=0
151 net.ipv6.conf.default.forwarding=0
152 net.ipv6.conf.all.forwarding=0
154 /etc/dropbear/authorized_keys:
155 content: "{{ ssh_users_root | user_ssh_keys(users) | join('\n') }}\n"
158 file: "{{ global_files_dir }}/common/htoprc"
165 hostname: '{{ inventory_hostname }}'
166 timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
171 - name: timeserver 'ntp'
176 - '0.lede.pool.ntp.org'
177 - '1.lede.pool.ntp.org'
178 - '2.lede.pool.ntp.org'
179 - '3.lede.pool.ntp.org'
185 RootPasswordAuth: 'off'
188 network: "{{ accesspoint_network_base + accesspoint_network_zones }}"
189 wireless: "{{ accesspoint_wireless_devices + accesspoint_wireless_ifaces }}"