Class: Ansible::Ruby::Modules::Sysvinit
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Sysvinit
- Defined in:
- lib/ansible/ruby/modules/generated/system/sysvinit.rb
Overview
Controls services on target hosts that use the SysV init system.
Instance Method Summary collapse
-
#arguments ⇒ Object?
Additional arguments provided on the command line that some init scripts accept.
-
#daemonize ⇒ Symbol?
Have the module daemonize as the service itself might not do so properly.,This is useful with badly written init scripts or deamons, which commonly manifests as the task hanging as it is still holding the tty or the service dying when the task is over as the connection closes the session.
-
#enabled ⇒ Symbol?
Whether the service should start on boot.
-
#name ⇒ String
Name of the service.
-
#pattern ⇒ Object?
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.,This option is mainly for use with init scripts that don’t support the ‘status’ option.
-
#runlevels ⇒ Array<Integer>, ...
The runlevels this script should be enabled/disabled from.,Use this to override the defaults set by the package or init script itself.
-
#sleep ⇒ Integer?
If the service is being C(restarted) or C(reloaded) 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, 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?
Returns Additional arguments provided on the command line that some init scripts accept.
35 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 35 attribute :arguments |
#daemonize ⇒ Symbol?
Returns Have the module daemonize as the service itself might not do so properly.,This is useful with badly written init scripts or deamons, which commonly manifests as the task hanging as it is still holding the tty or the service dying when the task is over as the connection closes the session.
38 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 38 attribute :daemonize |
#enabled ⇒ Symbol?
Returns Whether the service should start on boot. B(At least one of state and enabled are required.).
20 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 20 attribute :enabled |
#name ⇒ String
Returns Name of the service.
12 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 12 attribute :name |
#pattern ⇒ Object?
Returns 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.,This option is mainly for use with init scripts that don’t support the ‘status’ option.
28 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 28 attribute :pattern |
#runlevels ⇒ Array<Integer>, ...
Returns The runlevels this script should be enabled/disabled from.,Use this to override the defaults set by the package or init script itself.
31 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 31 attribute :runlevels |
#sleep ⇒ Integer?
Returns If the service is being C(restarted) or C(reloaded) then sleep this many seconds between the stop and start command. This helps to workaround badly behaving services.
24 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 24 attribute :sleep |
#state ⇒ :started, ...
Returns C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. Not all init scripts support C(restarted) nor C(reloaded) natively, so these will both trigger a stop and start as needed.
16 |
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 16 attribute :state |