-
Notifications
You must be signed in to change notification settings - Fork 0
/
channels.sls
28 lines (25 loc) · 1.57 KB
/
channels.sls
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
edit 2ghz channel & set txpower:
file.blockreplace:
- name: /etc/config/wireless
- marker_start: "config wifi-device 'radio1'"
- marker_end: "config"
{% if grains['os'] == 'OpenWrt' %}
- content: "\toption type 'mac80211'\n\toption channel '{{ pillar['channel2ghz'] }}'\n\toption hwmode '11g'\n\toption path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'\n\toption htmode 'HT20'\n\toption country 'DE'\n\toption txpower '20'\n\n"
{% else %}
- content: "\toption type 'mac80211'\n\toption channel '{{ pillar['channel2ghz'] }}'\n\toption hwmode '11g'\n\toption path 'soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0'\n\toption htmode 'HT20'\n\toption country 'DE'\n\toption txpower '20'\n\n"
{% endif %}
- show_changes: True
edit 5ghz channel and set txpower:
file.blockreplace:
- name: /etc/config/wireless
- marker_start: "config wifi-device 'radio0'"
- marker_end: "config"
{% if grains['os'] == 'OpenWrt' %}
- content: "\toption type 'mac80211'\n\toption channel '{{ pillar['channel5ghz'] }}'\n\toption hwmode '11a'\n\toption path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'\n\toption htmode 'VHT80'\n\toption country 'DE'\n\toption txpower '27'\n\n"
{% else %}
- content: "\toption type 'mac80211'\n\toption channel '{{ pillar['channel5ghz'] }}'\n\toption hwmode '11a'\n\toption path 'soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0'\n\toption htmode 'VHT80'\n\toption country 'DE'\n\toption txpower '27'\n\n"
{% endif %}
- show_changes: True
reload wifi:
cmd.run:
- name: wifi