From e1fd69bfee9e04e0c4786f14b9fbbac371917bc4 Mon Sep 17 00:00:00 2001 From: Martin Kennedy Date: Tue, 2 Aug 2022 00:11:23 -0400 Subject: [PATCH] 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. --- inventory.yml | 10 ++++++++++ wireless-setup.yml | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/inventory.yml b/inventory.yml index 584099d..978aa2f 100644 --- a/inventory.yml +++ b/inventory.yml @@ -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 diff --git a/wireless-setup.yml b/wireless-setup.yml index 5c17faa..d028dcd 100644 --- a/wireless-setup.yml +++ b/wireless-setup.yml @@ -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: