service
Collection: builtin
Full Name: parallax.builtin.service
Aliases: ansible.builtin.service, service
Synopsis
Manage service
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | yes | Name of the service | |
| state | string | started | started/stopped/restarted/reloaded | |
| enabled | bool | Whether the service should start on boot | ||
| daemon_reload | bool | false | Run daemon-reload before doing any other operations | |
| use | string | auto | The service module implementation to use | |
| arguments | string | Additional arguments provided on the command line | ||
| pattern | string | If the service does not respond to the status command, name a substring to look for | ||
| runlevel | string | default | For OpenRC init scripts, the runlevel to manage | |
| sleep | int | 0 | If the service is being restarted then sleep this many seconds |
Example
- name: Example service task
service:
name: <your_name>