salt.states.service

Starting or restarting of services and daemons.

Services are defined as system daemons typically started with system init or rc scripts, services can be defined as running or dead.

httpd:
  service:
    - running

Members

dead

salt.states.service.dead(name, enable=None, sig=None)

Ensure that the named service is dead

name
The name of the init or rc script used to manage the service
enable
Set the service to be enabled at boot time, True sets the service to be enabled, False sets the named service to be disabled. The default is None, which does not enable or disable anything.
sig
The string to search for when looking for the service process with ps

disabled

salt.states.service.disabled(name)

Verify that the service is disabled on boot, only use this state if you don't want to manage the running process, remember that if you want to disable a service to use the enable: False option for the running or dead function.

name
The name of the init or rc script used to manage the service

enabled

salt.states.service.enabled(name)

Verify that the service is enabled on boot, only use this state if you don't want to manage the running process, remember that if you want to enable a running service to use the enable: True option for the running or dead function.

name
The name of the init or rc script used to manage the service

mod_watch

salt.states.service.mod_watch(name, sig=None, reload=False)

The service watcher, called to invoke the watch command.

name
The name of the init or rc script used to manage the service
sig
The string to search for when looking for the service process with ps

running

salt.states.service.running(name, enable=None, sig=None)

Verify that the service is running

name
The name of the init or rc script used to manage the service
enable
Set the service to be enabled at boot time, True sets the service to be enabled, False sets the named service to be disabled. The default is None, which does not enable or disable anything.
sig
The string to search for when looking for the service process with ps

Parent topic

Table Of Contents

Previous topic

salt.states.selinux

Next topic

salt.states.ssh_auth