systemd
Collection: builtin
Full Name: parallax.builtin.systemd
Aliases: ansible.builtin.systemd, systemd
Synopsis
Manage systemd
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | yes | Name of the systemd service unit | |
| 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 any action | |
| daemon_reexec | bool | false | Run daemon-reexec command before any action | |
| scope | string | system | Service scope Choices: system, user, global | |
| force | bool | false | Force stop a service by sending SIGKILL | |
| masked | bool | Whether the unit should be masked | ||
| no_block | bool | false | Do not synchronously wait for operation to finish | |
| user | string | Run systemctl as this user (for user services) | ||
| service | string | alias for the name parameter |
Example
- name: Example systemd task
systemd:
name: <your_name>