Class: Ansible::Ruby::Modules::Service
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Service
- Defined in:
- lib/ansible/ruby/modules/generated/core/system/service.rb
Overview
Controls services on remote hosts. Supported init systems include BSD init, OpenRC, SysV, Solaris SMF, systemd, upstart.
Instance Method Summary collapse
-
#arguments ⇒ Object?
Additional arguments provided on the command line.
-
#enabled ⇒ :yes, ...
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 ⇒ :started, ...
C(started)/C(stopped) are idempotent actions that will not run commands unless necessary.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#arguments ⇒ Object?
Returns Additional arguments provided on the command line.
34 |
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 34 attribute :arguments |
#enabled ⇒ :yes, ...
Returns Whether the service should start on boot. B(At least one of state and enabled are required.).
26 |
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 26 attribute :enabled |
#name ⇒ String
Returns Name of the service.
11 |
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 11 attribute :name |
#pattern ⇒ String?
Returns 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. If the string is found, the service will be assumed to be running.
22 |
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 22 attribute :pattern |
#runlevel ⇒ String?
Returns For OpenRC init scripts (ex: Gentoo) only. The runlevel that this service belongs to.
30 |
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 30 attribute :runlevel |
#sleep ⇒ Object?
Returns If the service is being C(restarted) then sleep this many seconds between the stop and start command. This helps to workaround badly behaving init scripts that exit immediately after signaling a process to stop.
19 |
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 19 attribute :sleep |
#state ⇒ :started, ...
Returns C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. C(restarted) will always bounce the service. C(reloaded) will always reload. B(At least one of state and enabled are required.).
15 |
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 15 attribute :state |