community.general.openwrt_init module – Manage services on OpenWrt
Note
This module is part of the community.general collection (version 11.4.0).
You might already have this collection installed if you are using the ansible package.
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.general.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.openwrt_init.
Synopsis
- Controls OpenWrt services on remote hosts. 
Requirements
The below requirements are needed on the host that executes this module.
- An OpenWrt system (with python) 
Parameters
| Parameter | Comments | 
|---|---|
| Name of the service. | |
| If the service does not respond to the  | |
| 
 
 
 Choices: 
 | 
Attributes
| Attribute | Support | Description | 
|---|---|---|
| Support: full | Can run in  | |
| Support: none | Returns details on what has changed (or possibly needs changing in  | 
Notes
Note
- One option other than - nameis required.
Examples
- name: Start service httpd, if not running
  community.general.openwrt_init:
    state: started
    name: httpd
- name: Stop service cron, if running
  community.general.openwrt_init:
    name: cron
    state: stopped
- name: Reload service httpd, in all cases
  community.general.openwrt_init:
    name: httpd
    state: reloaded
- name: Enable service httpd
  community.general.openwrt_init:
    name: httpd
    enabled: true
