feat(ansible): migrate OpenWrt package management from opkg to apk
OpenWrt 25.12+ uses apk instead of opkg. The community.openwrt.apk module is only available in the unreleased 1.4.0 (git main), so requirements.yml now installs the collection from git. - requirements.yml: install community.openwrt from git main branch (comment explains why — apk module not yet in a Galaxy release) - packages.yml: switch from community.openwrt.opkg to apk, use join filter to pass all packages at once instead of looping
This commit is contained in:
@@ -3,5 +3,9 @@ collections:
|
|||||||
version: ">=3.16.0"
|
version: ">=3.16.0"
|
||||||
- name: community.hashi_vault
|
- name: community.hashi_vault
|
||||||
version: ">=7.1.0"
|
version: ">=7.1.0"
|
||||||
|
# community.openwrt.apk module (required for OpenWrt 25.12+ which dropped opkg)
|
||||||
|
# is only available in 1.4.0 which is not yet released on Galaxy — install from git.
|
||||||
- name: community.openwrt
|
- name: community.openwrt
|
||||||
version: ">=1.0.0"
|
source: https://github.com/ansible-collections/community.openwrt.git
|
||||||
|
type: git
|
||||||
|
version: main
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
community.openwrt.opkg:
|
community.openwrt.apk:
|
||||||
name: "{{ item }}"
|
name: "{{ openwrt_packages | join(',') }}"
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
loop: "{{ openwrt_packages }}"
|
when: openwrt_packages | length > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user