Class: Ansible::Ruby::Modules::Service
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Service
- Defined in:
- lib/ansible/ruby/modules/generated/system/service.rb
Overview
Controls services on remote hosts. Supported init systems include BSD init, OpenRC, SysV, Solaris SMF, systemd, upstart. For Windows targets, use the M(win_service) module instead.
Instance Method Summary collapse
-
#arguments ⇒ Object?
Additional arguments provided on the command line.
-
#enabled ⇒ Symbol?
Whether the service should start on boot.
-
#name ⇒ String
Name of the service.
-
#pattern ⇒ String?
If the service does not respond to the status command, name a substring to look for as would be found in the output of the I(ps) command as a stand-in for a status result.
-
#runlevel ⇒ String?
For OpenRC init scripts (ex: Gentoo) only.
-
#sleep ⇒ Object?
If the service is being C(restarted) then sleep this many seconds between the stop and start command.
-
#state ⇒ :reloaded, ...
C(started)/C(stopped) are idempotent actions that will not run commands unless necessary.
-
#use ⇒ String?
The service module actually uses system specific modules, normally through auto detection, this setting can force a specific module.,Normally it uses the value of the ‘ansible_service_mgr’ fact and falls back to the old ‘service’ module when none matching is found.
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
#arguments ⇒ Object?
36 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 36 attribute :arguments |
#enabled ⇒ Symbol?
28 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 28 attribute :enabled |
#name ⇒ String
13 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 13 attribute :name |
#pattern ⇒ String?
24 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 24 attribute :pattern |
#runlevel ⇒ String?
32 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 32 attribute :runlevel |
#sleep ⇒ Object?
21 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 21 attribute :sleep |
#state ⇒ :reloaded, ...
17 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 17 attribute :state |
#use ⇒ String?
39 |
# File 'lib/ansible/ruby/modules/generated/system/service.rb', line 39 attribute :use |