Class: Chef::Resource::RsShutdown
- Inherits:
-
Chef::Resource
- Object
- Chef::Resource
- Chef::Resource::RsShutdown
- Defined in:
- lib/chef/providers/rs_shutdown_resource.rb
Overview
Scriptable system shutdown chef resource.
Instance Method Summary collapse
-
#immediately(arg = nil) ⇒ Object
(String) RightScript nickname.
-
#initialize(name, run_context = nil) ⇒ RsShutdown
constructor
Initialize rs_shutdown resource.
Constructor Details
#initialize(name, run_context = nil) ⇒ RsShutdown
Initialize rs_shutdown resource
Parameters
- name(String)
-
Tag name
- run_context(Chef::RunContext)
-
Run context or nil
34 35 36 37 38 39 40 |
# File 'lib/chef/providers/rs_shutdown_resource.rb', line 34 def initialize(name, run_context=nil) super(name, run_context) @resource_name = :rs_shutdown @action = :reboot @immediately = false @allowed_actions.push(:reboot, :stop, :terminate) end |
Instance Method Details
#immediately(arg = nil) ⇒ Object
(String) RightScript nickname
43 44 45 46 47 48 49 |
# File 'lib/chef/providers/rs_shutdown_resource.rb', line 43 def immediately(arg=nil) set_or_return( :immediately, arg, :kind_of => [ TrueClass, FalseClass ] ) end |