feat: packages: allow per-host package conf

We want to be able to assert / de-assert the presence of certain
packages.

Note that the ansible-openwrt role already gives us an opkg cache
refresh.
This commit is contained in:
Martin Kennedy 2022-08-02 00:11:23 -04:00
parent 60ded8e0f7
commit e1fd69bfee
2 changed files with 16 additions and 0 deletions

View File

@ -1,6 +1,16 @@
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
network:
device:
- name: br-lan

View File

@ -1,7 +1,13 @@
- hosts: openwrt
roles:
- gekmihesg.openwrt
tasks:
- name: Install the right packages
opkg:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop: "{{ packages | default([]) }}"
- name: Setup network devices
uci: