summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Doherty <randomcamel@users.noreply.github.com>2014-09-17 08:58:31 -0700
committerChris Doherty <randomcamel@users.noreply.github.com>2014-09-17 08:58:31 -0700
commit6be4df9ac8c108c789162a7d3afa5ba1e4b4e075 (patch)
tree46deeebe7248027ad4d25cdc28f91afd994a1f89
parent7aae8dbe358076d985ef04150692483f4af1c9c0 (diff)
parenteed1067f66c876db938f696eef867d145e5a2dc0 (diff)
downloadchef-6be4df9ac8c108c789162a7d3afa5ba1e4b4e075.tar.gz
Merge pull request #2067 from opscode/cdoherty-reboot-resource-docs
Doc changes for the core reboot resource.
-rw-r--r--DOC_CHANGES.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/DOC_CHANGES.md b/DOC_CHANGES.md
index 8b70f40c5a..ad45e4c383 100644
--- a/DOC_CHANGES.md
+++ b/DOC_CHANGES.md
@@ -145,3 +145,30 @@ $ knife search node "platform:ubuntu" --filter-result "c_version:languages.c.gcc
$
```
+
+### Reboot resource in core
+The `reboot` resource will reboot the server, a necessary step in some installations, especially on Windows. If this resource is used with notifications, it must receive explicit `:immediate` notifications only: results of delayed notifications are undefined. Currently supported on Windows, Linux, and OS X; will work incidentally on some other Unixes.
+
+There are three actions:
+
+```ruby
+reboot "app_requires_reboot" do
+ action :request_reboot
+ reason "Need to reboot when the run completes successfully."
+ delay_mins 5
+end
+
+reboot "cancel_reboot_request" do
+ action :cancel
+ reason "Cancel a previous end-of-run reboot request."
+end
+
+reboot "now" do
+ action :reboot_now
+ reason "Cannot continue Chef run without a reboot."
+ delay_mins 2
+end
+
+# the `:immediate` is required for results to be defined.
+notifies :reboot_now, "reboot[now]", :immediate
+```