Skip to content

ansible-collections/community.openwrt

Community OpenWrt Collection

CI Collection Docs (PUSH)

Warning

While community.openwrt 1.0.0 is not released, there is no strong commitment to backward compatibility - breaking changes may be introduced without further notices.

We appreciate the feedback from users during this phase, but keep in mind that this collection is not yet deemed ready for production workloads.

Description

This collection enables the automated configuration of your OpenWrt devices.

We encourage new users to read the User Guide.

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.

Our mission

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!

Code of Conduct

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.

Communication

For more information about communication, see the Ansible communication guide.

Contributing to this collection

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:

Collection maintenance

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:

They also should be subscribed to Ansible's The Bullhorn newsletter.

Governance

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!

Tested with Ansible

The collection is currently tested with ansible-core versions:

  • 2.17
  • 2.18
  • 2.19
  • 2.20
  • devel

External requirements

The collection is currently tested against OpenWrt versions:

  • 21.02
  • 22.03
  • 23.05
  • 24.10
  • 25.12-rc1

Keep in mind that OpenWrt, per its Support Status policy, support at most two different release numbers. In fact, OpenWrt 23.05 was declared EOL in Aug 2025.

Though this collection is tested against older versions of OpenWrt, it is likely that, in the future, it will synchronize support, to some extent, to that of the OpenWrt releases.

Testing Requirements

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

SSH Connection Limitations

OpenWrt versions prior to 24.10 have been failing while connecting to the containers using SSH. The client side uses OpenSSH 9.6+ whilst the OpenWrt images use a range of versions of Dropbear SSH server. There seems to be some incompatibility related to CVE-2023-48795, but OpenWrt 22.03 and 23.05 have had security patches backported into them, so possibly some specific SSH configuration is missing for that to work.

The tests are being performed using docker connections.

Included content

Please check the included content on the Ansible Galaxy page for this collection

Using 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: myrouter

Installing the Collection from Ansible Galaxy

Before using this collection, you need to install it with the Ansible Galaxy command-line tool:

ansible-galaxy collection install community.openwrt

You 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.openwrt

Note that if you install the collection from Ansible Galaxy, it will not be 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 --upgrade

You 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:

ansible-galaxy collection install community.openwrt:==0.3.0

See using Ansible collections for more details.

Release notes

See the changelog.

Roadmap

There is no roadmap for this collection at this moment. One should be created and published if community feedback shows an appetite for it.

More information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published