community.openwrt.opkg module – Manage packages with opkg on OpenWrt
Note
This module is part of the community.openwrt collection (version 0.5.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.opkg.
Synopsis
The community.openwrt.opkg module manages packages on OpenWrt using the opkg package manager.
It can install, remove, and update packages.
Note
This module has a corresponding action plugin.
Parameters
Parameter |
Comments |
|---|---|
Remove dependencies that are no longer required when removing a package. Choices:
|
|
Force option to pass to opkg. Choices:
|
|
Name of the package(s) to install or remove. Multiple packages can be specified as a comma-separated list. |
|
Do not follow dependencies. Choices:
|
|
Whether the package should be installed or removed. Choices:
|
|
Update the package cache ( Choices:
|
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. |
Examples
- name: Install a package
community.openwrt.opkg:
name: vim
state: present
- name: Remove a package
community.openwrt.opkg:
name: vim
state: absent
- name: Install multiple packages
community.openwrt.opkg:
name: vim,curl,wget
state: present
- name: Update cache and install package
community.openwrt.opkg:
name: nginx
state: present
update_cache: true
- name: Force reinstall a package
community.openwrt.opkg:
name: busybox
state: present
force: reinstall