summaryrefslogtreecommitdiff
path: root/inventory/group_vars/ele-ap/main.yml
blob: e1dfc71c20b1463f9a404ffa04a49e42a3c782c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
network_mgmt_zone: "{{ network_zones.mgmt }}"

accesspoint_wifi_channels:
  2g4:
    ele-ap-forum0: 3
    ele-ap-forum1: 8
    ele-ap-forum2: 13
    ele-ap-dom0: 6
    ele-ap-kunsthaus0: 6
    ele-ap-orpheum0: 6
  5g:
    ele-ap-forum0: 36
    ele-ap-forum1: 48
    ele-ap-forum2: 40
    ele-ap-dom0: 40
    ele-ap-kunsthaus0: 40
    ele-ap-orpheum0: 40

accesspoint_zones:
  lan:
    ssid: "elevate Staff"
    encryption: "psk2"
    key: "{{ vault_ele_ap.accesspoint_zones.lan.key }}"
  guest:
    ssid: "elevate Public"
    encryption: "psk2"
    key: "{{ vault_ele_ap.accesspoint_zones.guest.key }}"
  infoscreens:
    ssid: "elevate Infoscreens"
    encryption: "psk2"
    key: "{{ vault_ele_ap.accesspoint_zones.infoscreens.key }}"


accesspoint_network_zones: "{{ accesspoint_network_zones_yaml | from_yaml }}"
accesspoint_network_zones_yaml: |
  {% for zone_name in accesspoint_zones.keys() %}
  - name: "interface '{{ zone_name }}'"
    options:
      type: bridge
      ifname: "{{ accesspoint_wired_interface }}.{{ network_zones[zone_name].vlan }}"
      accept_ra: 0
      proto: none
  {% endfor %}


## TODO: set up 802.11r see:
##        * https://www.reddit.com/r/openwrt/comments/515oea/finally_got_80211r_roaming_working/
##        * https://gist.github.com/lg/998d3e908d547bd9972a6bb604df377b
accesspoint_wireless_ifaces: "{{ accesspoint_wireless_ifaces_yaml | from_yaml }}"
accesspoint_wireless_ifaces_yaml: |
  {% for zone in accesspoint_zones.keys() %}
  {%   for freq in accesspoint_wireless_frequencies %}
  - name: wifi-iface '{{ zone }}{{ freq }}'
    options:
      device: 'radio{{ freq }}'
      network: '{{ zone }}'
      mode: 'ap'
      disassoc_low_ack: '1'
      rsn_preauth: '1'
      ssid: '{{ accesspoint_zones[zone].ssid }}'
      encryption: '{{ accesspoint_zones[zone].encryption }}'
      key: '{{ accesspoint_zones[zone].key }}'
  {%   endfor %}
  {% endfor %}