Class: Ansible::Ruby::Modules::Win_service

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/windows/win_service.rb

Overview

Manage and query Windows services. For non-Windows targets, use the M(service) module instead.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#dependenciesArray<String>, ...

Returns 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 C(dependency_action) to either add/remove or set the services in this list.

Returns:

  • (Array<String>, String, nil)

    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 C(dependency_action) to either add/remove or set the services in this list.



13
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 13

attribute :dependencies

#dependency_action:add, ...

Returns Used in conjunction with C(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.

Returns:

  • (:add, :remove, :set, nil)

    Used in conjunction with C(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.



17
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 17

attribute :dependency_action

#descriptionString?

Returns The description to set for the service.

Returns:

  • (String, nil)

    The description to set for the service.



25
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 25

attribute :description

#desktop_interact:yes, ...

Returns Whether to allow the service user to interact with the desktop.,This should only be set to C(yes) when using the LocalSystem username.

Returns:

  • (:yes, :no, nil)

    Whether to allow the service user to interact with the desktop.,This should only be set to C(yes) when using the LocalSystem username.



21
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 21

attribute :desktop_interact

#display_nameString?

Returns The display name to set for the service.

Returns:

  • (String, nil)

    The display name to set for the service.



29
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 29

attribute :display_name

#force_dependent_services:yes, ...

Returns If C(yes), stopping or restarting a service with dependent services will force the dependent services to stop or restart also.,If C(no), stopping or restarting a service with dependent services may fail.

Returns:

  • (:yes, :no, nil)

    If C(yes), stopping or restarting a service with dependent services will force the dependent services to stop or restart also.,If C(no), stopping or restarting a service with dependent services may fail.



33
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 33

attribute :force_dependent_services

#nameString

Returns 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.

Returns:

  • (String)

    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.



37
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 37

attribute :name

#passwordString?

Returns The password to set the service to start as.,This and the C(username) argument must be supplied together.,If specifying LocalSystem, NetworkService or LocalService this field must be an empty string and not null.

Returns:

  • (String, nil)

    The password to set the service to start as.,This and the C(username) argument must be supplied together.,If specifying LocalSystem, NetworkService or LocalService this field must be an empty string and not null.



45
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 45

attribute :password

#pathString?

Returns The path to the executable to set for the service.

Returns:

  • (String, nil)

    The path to the executable to set for the service.



41
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 41

attribute :path

#start_mode:auto, ...

Returns Set the startup type for the service.,C(delayed) added in Ansible 2.3.

Returns:

  • (:auto, :delayed, :disabled, :manual, nil)

    Set the startup type for the service.,C(delayed) added in Ansible 2.3



49
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 49

attribute :start_mode

#state:absent, ...

Returns C(started)/C(stopped)/C(absent)/C(pause) are idempotent actions that will not run commands unless necessary.,C(restarted) will always bounce the service.,C(absent) added in Ansible 2.3,C(pause) was added in Ansible 2.4,Only services that support the paused state can be paused, you can check the return value C(can_pause_and_continue).,You can only pause a service that is already started.

Returns:

  • (:absent, :paused, :started, :stopped, :restarted, nil)

    C(started)/C(stopped)/C(absent)/C(pause) are idempotent actions that will not run commands unless necessary.,C(restarted) will always bounce the service.,C(absent) added in Ansible 2.3,C(pause) was added in Ansible 2.4,Only services that support the paused state can be paused, you can check the return value C(can_pause_and_continue).,You can only pause a service that is already started.



53
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 53

attribute :state

#usernameString?

Returns The username to set the service to start as.,This and the C(password) argument must be supplied together when using a local or domain account.,Set to C(LocalSystem) to use the SYSTEM account.

Returns:

  • (String, nil)

    The username to set the service to start as.,This and the C(password) argument must be supplied together when using a local or domain account.,Set to C(LocalSystem) to use the SYSTEM account.



57
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 57

attribute :username