From ca51484234d85341bf4df613a4ffab162bcadbe2 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 2 Oct 2022 22:51:09 +0200 Subject: refactoring of access point client steering config --- inventory/group_vars/accesspoints/vars.yml | 48 +++++++++++++++++------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'inventory/group_vars/accesspoints') diff --git a/inventory/group_vars/accesspoints/vars.yml b/inventory/group_vars/accesspoints/vars.yml index e78740d4..b704e147 100644 --- a/inventory/group_vars/accesspoints/vars.yml +++ b/inventory/group_vars/accesspoints/vars.yml @@ -105,7 +105,7 @@ accesspoint_wireless_ifaces_yaml: | mobility_domain: '{{ "%04x" % (accesspoint_80211r.mobility_domain_base + outer_loop.index0) }}' ft_over_ds: '1' {% endif %} - {% if accesspoint_band_steering is defined %} + {% if accesspoint_client_steering is defined %} bss_transition: '1' wnm_sleep_mode: '1' time_advertisement: '2' @@ -156,14 +156,14 @@ openwrt_packages_add: - libiwinfo-lua - libubus-lua -_accesspoint_band_steering_packages_extra_: +_accesspoint_client_steering_packages_extra_: none: [] dawn: - dawn usteer: - usteer -openwrt_packages_extra: "{{ _accesspoint_band_steering_packages_extra_[accesspoint_band_steering.kind | default('none')] }}" +openwrt_packages_extra: "{{ _accesspoint_client_steering_packages_extra_[accesspoint_client_steering.kind | default('none')] }}" openwrt_mixin: @@ -352,10 +352,22 @@ openwrt_uci_base: network: "{{ accesspoint_network_base + accesspoint_network_zones }}" wireless: "{{ accesspoint_wireless_devices + accesspoint_wireless_ifaces }}" + +_accesspoint_client_steering_options_default_: + dawn: + network: + broadcast_ip: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr('broadcast') }}" + usteer: + network: 'mgmt' + syslog: '1' + local_mode: '0' + ipv6: '0' + debug_level: '2' + openwrt_uci_band_steering: "{{ openwrt_uci_band_steering_yaml | from_yaml }}" openwrt_uci_band_steering_yaml: | - {% if accesspoint_band_steering is defined %} - {% if accesspoint_band_steering.kind == 'dawn' %} + {% if accesspoint_client_steering is defined %} + {% if accesspoint_client_steering.kind == 'dawn' %} umdns: - name: umds options: @@ -363,29 +375,23 @@ openwrt_uci_band_steering_yaml: | network: - mgmt - ## TODO: what are the minimal required settings here?? dawn: - - name: network + {% for section, options in (_accesspoint_client_steering_options_default_.dawn | combine(accesspoint_client_steering.options | default({}))).items() %} + - name: {{ section }} options: - broadcast_ip: '{{ network_mgmt_zone.prefix | ansible.utils.ipaddr("broadcast") }}' - {% elif accesspoint_band_steering.kind == 'usteer' %} + {% for option, value in options.items() %} + {{ option }}: {{ value }} + {% endfor %} + {% endfor %} + {% elif accesspoint_client_steering.kind == 'usteer' %} usteer: - name: usteer options: - network: 'mgmt' - syslog: '1' - local_mode: '0' - ipv6: '0' - debug_level: '2' - assoc_steering: '1' - band_steering_threshold: '0' - band_steering_interval: '30000' - ssid_list: - {% for zone in accesspoint_band_steering.zones %} - - '{{ accesspoint_zones[zone].ssid }}' + {% for option,value in (_accesspoint_client_steering_options_default_.usteer | combine(accesspoint_client_steering.options | default({}))).items() %} + {{ option }}: {{ value }} {% endfor %} {% endif %} {% endif %} -openwrt_uci: "{{ openwrt_uci_base | combine(accesspoint_band_steering is defined | ternary(openwrt_uci_band_steering, {})) }}" +openwrt_uci: "{{ openwrt_uci_base | combine(accesspoint_client_steering is defined | ternary(openwrt_uci_band_steering, {})) }}" -- cgit v1.2.3