feat: Configure network-specific packages
This is probably not the right way to do this ... but it's tricky. Packages that are REQUIRED for proper network config need to be handled somewhere before we do network config. Perhaps this could be moved to the netconfig role on its own, but I don't really want to try.
This commit is contained in:
parent
ad80c3d464
commit
b46bf38e84
@ -1,15 +1,30 @@
|
||||
templates:
|
||||
package_ath10k_mesh: &package_ath10k_mesh
|
||||
- name: kmod-ath10k-ct
|
||||
state: absent
|
||||
- name: ath10k-firmware-qca988x-ct
|
||||
state: absent
|
||||
- name: kmod-ath10k
|
||||
state: present
|
||||
- name: ath10k-firmware-qca988x
|
||||
state: present
|
||||
|
||||
package_wpad_mesh: &package_wpad_mesh
|
||||
- name: wpad-basic-wolfssl
|
||||
state: absent
|
||||
- name: wpad-mesh-wolfssl
|
||||
state: absent
|
||||
- name: wpad-wolfssl
|
||||
state: present
|
||||
notify:
|
||||
- Reload wpad
|
||||
|
||||
openwrt:
|
||||
hosts:
|
||||
ap3825i2.lan:
|
||||
packages:
|
||||
- name: kmod-ath10k-ct
|
||||
state: absent
|
||||
- name: ath10k-firmware-qca988x-ct
|
||||
state: absent
|
||||
- name: kmod-ath10k
|
||||
state: present
|
||||
- name: ath10k-firmware-qca988x
|
||||
state: present
|
||||
ath10k: *package_ath10k_mesh
|
||||
wpad: *package_wpad_mesh
|
||||
|
||||
network:
|
||||
device:
|
||||
|
9
roles/netpkgconfig/handlers/main.yml
Normal file
9
roles/netpkgconfig/handlers/main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
- name: Reload wpad
|
||||
nohup:
|
||||
command: "wifi down; /etc/init.d/wpad restart; wifi up"
|
||||
|
||||
- name: Touch a file
|
||||
command:
|
||||
argv:
|
||||
- touch
|
||||
- /tmp/test_proof
|
2
roles/netpkgconfig/meta/main.yml
Normal file
2
roles/netpkgconfig/meta/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- role: gekmihesg.openwrt
|
13
roles/netpkgconfig/tasks/main.yml
Normal file
13
roles/netpkgconfig/tasks/main.yml
Normal file
@ -0,0 +1,13 @@
|
||||
- name: Install the correct wpad packages
|
||||
opkg:
|
||||
name: "{{ item.name }}"
|
||||
state: "{{ item.state }}"
|
||||
loop: "{{ packages.wpad | default([]) }}"
|
||||
notify: "{{ item.notify | default([]) }}"
|
||||
|
||||
- name: Install the correct ath10k packages
|
||||
opkg:
|
||||
name: "{{ item.name }}"
|
||||
state: "{{ item.state }}"
|
||||
loop: "{{ packages.ath10k | default([]) }}"
|
||||
notify: "{{ item.notify | default([]) }}"
|
@ -1,3 +1,4 @@
|
||||
- hosts: openwrt
|
||||
roles:
|
||||
- netpkgconfig
|
||||
- netconfig
|
||||
|
Loading…
Reference in New Issue
Block a user