systemd_service

Collection: builtin

Full Name: parallax.builtin.systemd_service

Aliases: ansible.builtin.systemd_service, systemd_service

Synopsis

Manage systemd service

Parameters

NameTypeRequiredDefaultDescription
namestringyesName of the systemd service
statestringstartedService state Choices: reloaded, restarted, started, stopped
enabledboolWhether the service should start on boot
daemon_reloadboolfalseRun daemon-reload before doing any other operations
daemon_reexecboolfalseRun daemon-reexec before doing any other operations
scopestringsystemRun systemctl within a given scope Choices: system, user, global
maskedboolWhether the unit should be masked or not
forceboolfalseWhether to override existing symlinks
no_blockboolfalseDo not synchronously wait for the requested operation to finish

Example

- name: Example systemd_service task
  systemd_service:
    name: <your_name>