This collection enables the automated configuration of your OpenWrt devices.
We encourage new users to read the User Guide and the How-To Guides.
If you are migrating from the gekmihesg.openwrt role, please read the
Migration Guide.
Check the complete documentation for the collection. Please note that this documentation reflects the state of the development branch.
At the community.openwrt, our mission is to produce and maintain simple, flexible,
and powerful open-source software tailored to manage and support OpenWrt devices.
This Ansible collection is originally based on the role gekmihesg.openwrt, maintained by Markus Weippert until 2022.
We acknowledge and we are grateful for the time and effort he dispensed to maintain that role over the years.
We welcome members from all skill levels to participate actively in our open, inclusive, and vibrant community.
Whether you are an expert or just beginning your journey with Ansible and community.openwrt,
you are encouraged to contribute, share insights, and collaborate with fellow enthusiasts!
We follow the Ansible Code of Conduct in all our interactions within this project.
If you encounter abusive behavior, please refer to the policy violations section of the Code for information on how to raise a complaint.
- Join the Ansible forum:
- Get Help: get help or help others. Please add appropriate tags if you start new discussions, for example the
community-openwrttag. - Posts tagged with 'community-openwrt': subscribe to participate in collection/technology-related conversations.
- Social Spaces: gather and interact with fellow enthusiasts.
- News & Announcements: track project-wide announcements including social events. The Bullhorn newsletter, which is used to announce releases and important changes, can also be found here.
- Get Help: get help or help others. Please add appropriate tags if you start new discussions, for example the
For more information about communication, see the Ansible communication guide.
The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.
We are actively accepting new contributors and all types of contributions are very welcome.
Don't know how to start? Refer to the Ansible community guide!
Want to submit code changes? Take a look at the Quick-start development guide.
We also use the following guidelines:
To learn how to maintain/become a maintainer of this collection, refer to the Maintainer guidelines.
It is necessary for maintainers of this collection to be subscribed to:
- The collection itself (the
Watchbutton ->All Activityin the upper right corner of the repository's homepage). - The news-for-maintainers repository.
They also should be subscribed to Ansible's The Bullhorn newsletter.
The process of decision making in this collection is based on discussing and finding consensus among participants. Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it!
The collection is currently tested with ansible-core versions:
- 2.18
- 2.19
- 2.20
- devel
The collection is currently tested against OpenWrt versions:
- 23.05 (EOL)
- 24.10
- 25.12 (Release Candidate)
Keep in mind that OpenWrt supports only two or three different release numbers. As defined in Release and Maintenance, the collection supports at least one EOL version of OpenWrt.
The test uses Ansible Molecule to
spin up containers running OpenWrt (there are images available for the x86_64 architecture).
Tests require:
- a container runtime (docker, podman, containerd, etc...)
- Python packages specified in requirements-test.txt
The tests are being performed using docker connections.
Please check the included content on the Ansible Galaxy page for this collection
---
- hosts: openwrt_devices
gather_facts: false
roles:
- community.openwrt.init
tasks:
- name: Gather OpenWrt facts
community.openwrt.setup:
- name: Install a package
community.openwrt.opkg:
name: luci
state: present
- name: Configure UCI settings
community.openwrt.uci:
command: set
key: system.@system[0].hostname
value: myrouterBefore using this collection, you need to install it with the Ansible Galaxy command-line tool:
ansible-galaxy collection install community.openwrtYou can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:
---
collections:
- name: community.openwrtNote that if you install the collection from Ansible Galaxy, it is not upgraded automatically when you upgrade the ansible package. To upgrade the collection to the latest available version, run the following command:
ansible-galaxy collection install community.openwrt --upgradeYou can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 0.3.0 (for example):
ansible-galaxy collection install community.openwrt:==0.3.0See using Ansible collections for more details.
ansible-galaxy collection install git+https://github.com/ansible-collections/community.openwrtOr, if you want to install a vesion from a specific tag or branch:
ansible-galaxy collection install git+https://github.com/ansible-collections/community.openwrt,0.3.0See the changelog.
There is no roadmap for this collection at this moment. One should be created and published if community feedback shows an appetite for it.
- Ansible user guide
- Ansible developer guide
- Ansible collections requirements
- Ansible community Code of Conduct
- The Bullhorn (the Ansible contributor newsletter)
- Important announcements for maintainers
GNU General Public License v3.0 or later.
See LICENSE to see the full text.