Parameter |
Choices/Defaults |
Comments |
dependencies
(added in 2.3) |
|
A list of service dependencies to set for this particular service.
This should be a list of service names and not the display name of the service.
This works by dependency_action to either add/remove or set the services in this list.
|
dependency_action
(added in 2.3) |
Choices:
- add
- remove
set ←
|
Used in conjunction with dependency to either add the dependencies to the existing service dependencies.
Remove the dependencies to the existing dependencies.
Set the dependencies to only the values in the list replacing the existing dependencies.
|
description
(added in 2.3) |
|
The description to set for the service.
|
desktop_interact
bool
(added in 2.3) |
|
Whether to allow the service user to interact with the desktop.
This should only be set to yes when using the LocalSystem username.
|
display_name
(added in 2.3) |
|
The display name to set for the service.
|
force_dependent_services
bool
(added in 2.3) |
|
If yes , stopping or restarting a service with dependent services will force the dependent services to stop or restart also.
If no , stopping or restarting a service with dependent services may fail.
|
name
required |
|
Name of the service.
If only the name parameter is specified, the module will report on whether the service exists or not without making any changes.
|
password
(added in 2.3) |
|
The password to set the service to start as.
This and the username argument must be supplied together.
If specifying LocalSystem, NetworkService or LocalService this field must be an empty string and not null.
|
path
(added in 2.3) |
|
The path to the executable to set for the service.
|
start_mode
|
Choices:
- auto
- delayed
- disabled
- manual
|
Set the startup type for the service.
delayed added in Ansible 2.3
|
state
|
Choices:
- absent
- paused
- started
- stopped
- restarted
|
started /stopped /absent /pause are idempotent actions that will not run commands unless necessary.
restarted will always bounce the service.
absent added in Ansible 2.3
pause was added in Ansible 2.4
Only services that support the paused state can be paused, you can check the return value can_pause_and_continue .
You can only pause a service that is already started.
|
username
(added in 2.3) |
|
The username to set the service to start as.
This and the password argument must be supplied together when using a local or domain account.
Set to LocalSystem to use the SYSTEM account.
|