Class: Ansible::Ruby::Modules::Win_service
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Win_service
- 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
-
#dependencies ⇒ Array<String>, ...
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.
-
#dependency_action ⇒ :add, ...
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.
-
#description ⇒ String?
The description to set for the service.
-
#desktop_interact ⇒ :yes, ...
Whether to allow the service user to interact with the desktop.,This should only be set to C(yes) when using the LocalSystem username.
-
#display_name ⇒ String?
The display name to set for the service.
-
#force_dependent_services ⇒ :yes, ...
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.
-
#name ⇒ 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.
-
#password ⇒ String?
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.
-
#path ⇒ String?
The path to the executable to set for the service.
-
#start_mode ⇒ :auto, ...
Set the startup type for the service.,C(delayed) added in Ansible 2.3.
-
#state ⇒ :absent, ...
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.
-
#username ⇒ String?
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.
Methods inherited from Base
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
#dependencies ⇒ Array<String>, ...
13 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 13 attribute :dependencies |
#dependency_action ⇒ :add, ...
17 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 17 attribute :dependency_action |
#description ⇒ String?
25 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 25 attribute :description |
#desktop_interact ⇒ :yes, ...
21 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 21 attribute :desktop_interact |
#display_name ⇒ String?
29 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 29 attribute :display_name |
#force_dependent_services ⇒ :yes, ...
33 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 33 attribute :force_dependent_services |
#name ⇒ String
37 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 37 attribute :name |
#password ⇒ String?
45 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 45 attribute :password |
#path ⇒ String?
41 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 41 attribute :path |
#start_mode ⇒ :auto, ...
49 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 49 attribute :start_mode |
#state ⇒ :absent, ...
53 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 53 attribute :state |
#username ⇒ String?
57 |
# File 'lib/ansible/ruby/modules/generated/windows/win_service.rb', line 57 attribute :username |