service

Collection: builtin

Full Name: parallax.builtin.service

Aliases: ansible.builtin.service, service

Synopsis

Manage service

Parameters

NameTypeRequiredDefaultDescription
namestringyesName of the service
statestringstartedstarted/stopped/restarted/reloaded
enabledboolWhether the service should start on boot
daemon_reloadboolfalseRun daemon-reload before doing any other operations
usestringautoThe service module implementation to use
argumentsstringAdditional arguments provided on the command line
patternstringIf the service does not respond to the status command, name a substring to look for
runlevelstringdefaultFor OpenRC init scripts, the runlevel to manage
sleepint0If the service is being restarted then sleep this many seconds

Example

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