Class: Ansible::Ruby::Modules::Sysvinit

Inherits:
Base show all
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

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

#argumentsObject?

Returns Additional arguments provided on the command line that some init scripts accept.

Returns:

  • (Object, nil)

    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

#daemonizeSymbol?

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.

Returns:

  • (Symbol, nil)

    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

#enabledSymbol?

Returns Whether the service should start on boot. B(At least one of state and enabled are required.).

Returns:

  • (Symbol, nil)

    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

#nameString

Returns Name of the service.

Returns:

  • (String)

    Name of the service.



12
# File 'lib/ansible/ruby/modules/generated/system/sysvinit.rb', line 12

attribute :name

#patternObject?

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.

Returns:

  • (Object, nil)

    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

#runlevelsArray<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.

Returns:

  • (Array<Integer>, Integer, nil)

    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

#sleepInteger?

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.

Returns:

  • (Integer, nil)

    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.

Returns:

  • (:started, :stopped, :restarted, :reloaded, nil)

    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