Class: Ansible::Ruby::Modules::Service

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/core/system/service.rb

Instance Method Summary collapse

Methods inherited from Base

#to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, #initialize, #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.

Returns:

  • (Object, nil)

    Additional arguments provided on the command line



33
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 33

attribute :arguments

#enabled:yes, ...

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

Returns:

  • (:yes, :no, nil)

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



25
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 25

attribute :enabled

#nameString

Returns Name of the service.

Returns:

  • (String)

    Name of the service.



10
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 10

attribute :name

#patternString?

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.

Returns:

  • (String, nil)

    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.



21
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 21

attribute :pattern

#runlevelString?

Returns For OpenRC init scripts (ex: Gentoo) only. The runlevel that this service belongs to.

Returns:

  • (String, nil)

    For OpenRC init scripts (ex: Gentoo) only. The runlevel that this service belongs to.



29
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 29

attribute :runlevel

#sleepObject?

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.

Returns:

  • (Object, nil)

    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.



18
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 18

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.).

Returns:

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

    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.)



14
# File 'lib/ansible/ruby/modules/generated/core/system/service.rb', line 14

attribute :state