summaryrefslogtreecommitdiff
path: root/lib/chef/resource/batch.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-02-13 16:34:47 +0000
committerTim Smith <tsmith@chef.io>2018-02-14 11:37:36 -0800
commit5c2b9e201f65d04252a86b1ad89d756f3e73792f (patch)
tree7eaa3b8131eef7afa79422a79b0219021a5972b6 /lib/chef/resource/batch.rb
parentc563a379b2ac9a47f5bd5c9e0c40bebed86aae8c (diff)
downloadchef-5c2b9e201f65d04252a86b1ad89d756f3e73792f.tar.gz
Add new introduced and description resource properties to many resource
Not all of them, but a good chunk. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/batch.rb')
-rw-r--r--lib/chef/resource/batch.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/chef/resource/batch.rb b/lib/chef/resource/batch.rb
index b3c7b17cef..1c666a46ba 100644
--- a/lib/chef/resource/batch.rb
+++ b/lib/chef/resource/batch.rb
@@ -20,15 +20,17 @@ require "chef/resource/windows_script"
class Chef
class Resource
- # Use the batch resource to execute a batch script using the cmd.exe interpreter on Windows. The batch resource
- # creates and executes a temporary file (similar to how the script resource behaves), rather than running the
- # command inline. Commands that are executed with this resource are (by their nature) not idempotent, as they are
- # typically unique to the environment in which they are run. Use not_if and only_if to guard this resource for
- # idempotence.
class Batch < Chef::Resource::WindowsScript
-
provides :batch, os: "windows"
+ description "Use the batch resource to execute a batch script using the cmd.exe"\
+ " interpreter on Windows. The batch resource creates and executes a"\
+ " temporary file (similar to how the script resource behaves), rather"\
+ " than running the command inline. Commands that are executed with this"\
+ " resource are (by their nature) not idempotent, as they are typically"\
+ " unique to the environment in which they are run. Use not_if and only_if"\
+ " to guard this resource for idempotence."
+
def initialize(name, run_context = nil)
super(name, run_context, nil, "cmd.exe")
end