summaryrefslogtreecommitdiff
path: root/lib/chef/resource/dsc_resource.rb
diff options
context:
space:
mode:
authorSteven Murawski <steven.murawski@gmail.com>2015-11-13 16:44:06 -0600
committerSteven Murawski <steven.murawski@gmail.com>2015-11-18 10:18:50 -0600
commitfbdf03d3c174f1c2309a497efcf92227e191fdc0 (patch)
treee24c05fa5469eaf1dbf2e39ffa49820428d6708f /lib/chef/resource/dsc_resource.rb
parent303c4336bc39b54fffe78b06f2f473a0842be53f (diff)
downloadchef-fbdf03d3c174f1c2309a497efcf92227e191fdc0.tar.gz
Add reboot notification to dsc_resource
Diffstat (limited to 'lib/chef/resource/dsc_resource.rb')
-rw-r--r--lib/chef/resource/dsc_resource.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/chef/resource/dsc_resource.rb b/lib/chef/resource/dsc_resource.rb
index 5db00f49ca..b6167e76d0 100644
--- a/lib/chef/resource/dsc_resource.rb
+++ b/lib/chef/resource/dsc_resource.rb
@@ -31,6 +31,7 @@ class Chef
super
@properties = {}
@resource = nil
+ @reboot_action = :nothing
end
def resource(value=nil)
@@ -68,6 +69,17 @@ class Chef
end
end
+ # This property takes the action message for the reboot resource
+ # If the set method of the DSC resource indicate that a reboot
+ # is necessary, reboot_action provides the mechanism for a reboot to
+ # be requested.
+ def reboot_action(value=nil)
+ if value
+ @reboot_action = value
+ else
+ @reboot_action
+ end
+ end
private
def value_of(value)