community.openwrt.apk_feed module – Manage apk package feeds
Note
This module is part of the community.openwrt collection (version 1.11.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.openwrt.
To use it in a playbook, specify: community.openwrt.apk_feed.
New in community.openwrt 1.10.0
Synopsis
Add or remove a package feed in the repositories files read by
apk, and optionally the key the feed is signed with.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
|---|---|
Repositories file holding the feed. It is created when needed. The default file is the one OpenWrt keeps across a system upgrade. Default: |
|
PEM encoded public key the feed is signed with, written to Only used when |
|
Name of the key file in Required when When |
|
URL of the PEM encoded public key the feed is signed with, downloaded by the device to The key is downloaded on every run, check mode included, to compare it with the one in place. Only used when |
|
Whether the feed should be present or not. Choices:
|
|
Tag of the feed. When the feed is already present with another tag, or without one, its line is rewritten. |
|
Update the package index with Choices:
|
|
URL of the feed. A feed is identified by its URL, whatever its tag. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in |
|
Support: none |
Returns details on what has changed (or possibly needs changing in |
|
Platform: OpenWrt |
Target platform for this module. |
Notes
Note
This module requires
apk, the package manager of OpenWrt 25.12 and later.Keys in
/etc/apk/keys/are not kept across a system upgrade unless listed in/etc/sysupgrade.conf.
See Also
See also
- community.openwrt.apk
Manage packages with apk on OpenWrt.
Examples
- name: Add a third-party feed along with its signing key
community.openwrt.apk_feed:
url: https://m00qek.github.io/packages.ucode.dev/25.12
key_url: https://m00qek.github.io/packages.ucode.dev/25.12/feed.pub.pem
key_name: packages.ucode.dev.pem
update_cache: true
- name: Add a tagged feed in a file of its own
community.openwrt.apk_feed:
url: https://example.com/openwrt/packages.adb
tag: example
file: /etc/apk/repositories.d/example.list
- name: Remove the feed and its signing key
community.openwrt.apk_feed:
url: https://m00qek.github.io/packages.ucode.dev/25.12
key_name: packages.ucode.dev.pem
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Repositories file holding the feed. Returned: always Sample: |
|
Path of the key file. Returned: When Sample: |
|
Whether the feed is present or not. Returned: always Sample: |
|
Tag of the feed. Returned: always Sample: |
|
URL of the feed. Returned: always Sample: |