feat: wifi_device: Make band vs hwmode configurable
As per openwrt.org[1], the `band` configurable was introduced in OpenWrt 21.02.2, replacing `hwmode`. To handle the pre-21.02.2 nodes to which we're deploying, allow us to configure either of the two (but defaulting hwmode to null). [1]: https://openwrt.org/docs/guide-user/network/wifi/basic
This commit is contained in:
parent
df2c87b5fc
commit
6592260901
@ -42,10 +42,11 @@
|
|||||||
find_by:
|
find_by:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
value:
|
value:
|
||||||
band: "{{ item.band | default(wifi_device[item.template].band) }}"
|
band: "{{ item.band | default(wifi_device[item.template].band) | default() }}"
|
||||||
channel: "{{ item.channel | default(wifi_device[item.template].channel) }}"
|
channel: "{{ item.channel | default(wifi_device[item.template].channel) }}"
|
||||||
country: "{{ item.country | default(wifi_device[item.template].country) }}"
|
country: "{{ item.country | default(wifi_device[item.template].country) }}"
|
||||||
disabled: "{{ item.disabled | default(wifi_device[item.template].disabled) }}"
|
disabled: "{{ item.disabled | default(wifi_device[item.template].disabled) }}"
|
||||||
|
hwmode: "{{ item.hwmode | default(wifi_device[item.template].hwmode) | default() }}"
|
||||||
htmode: "{{ item.htmode | default(wifi_device[item.template].htmode) }}"
|
htmode: "{{ item.htmode | default(wifi_device[item.template].htmode) }}"
|
||||||
loop: "{{ wireless['wifi_device'] }}"
|
loop: "{{ wireless['wifi_device'] }}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user