systemd_service
Collection: builtin
Full Name: parallax.builtin.systemd_service
Aliases: ansible.builtin.systemd_service, systemd_service
Synopsis
Manage systemd service
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | yes | Name of the systemd service | |
| state | string | started | Service state Choices: reloaded, restarted, started, stopped | |
| enabled | bool | Whether the service should start on boot | ||
| daemon_reload | bool | false | Run daemon-reload before doing any other operations | |
| daemon_reexec | bool | false | Run daemon-reexec before doing any other operations | |
| scope | string | system | Run systemctl within a given scope Choices: system, user, global | |
| masked | bool | Whether the unit should be masked or not | ||
| force | bool | false | Whether to override existing symlinks | |
| no_block | bool | false | Do not synchronously wait for the requested operation to finish |
Example
- name: Example systemd_service task
systemd_service:
name: <your_name>