summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-03-23 17:05:19 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-03-23 17:06:26 -0700
commit393aaad9ea5618ccbcf99245f0da5201ac728032 (patch)
tree6454e8c9f7fe7583be13ab6abfbaa3c94a7df5e3
parent90e1c998425fc757a25d00880c5f06081377f7c2 (diff)
downloadchef-393aaad9ea5618ccbcf99245f0da5201ac728032.tar.gz
DOC_CHANGES for #2881
-rw-r--r--DOC_CHANGES.md72
1 files changed, 72 insertions, 0 deletions
diff --git a/DOC_CHANGES.md b/DOC_CHANGES.md
index 41d70fac61..ceac435273 100644
--- a/DOC_CHANGES.md
+++ b/DOC_CHANGES.md
@@ -11,3 +11,75 @@ Description of the required change.
`knife ssh` now has an --exit-on-error option that will cause it to
fail immediately in the face of an SSH connection error. The default
behavior is move on to the next node.
+
+### DSC Resource
+
+The `dsc_resource` resource for Windows systems that allows cookbook authors to invoke [PowerShell Desired
+State Configuration](http://technet.microsoft.com/en-us/library/dn249912.aspx) resources in Chef DSL.
+
+#### Prerequisites
+
+* **Windows Management Framework 5** February Preview
+* **Local Configuration Manager** must be set to have a `RefreshMode` of `Disabled`
+
+#### Syntax
+
+```ruby
+dsc_resource "description" do
+ resource "resource_name"
+ property :property_name, property_value
+ ...
+ property :property_name, property_value
+end
+```
+
+#### Attributes
+
+- `resource`: The friendly name of the DSC resource
+
+- `property`: `:property_name`, `property_value` pair for each property that must be set for the DSC resource.
+`property_name` must be of the `Symbol`. The following types are supported for `property_value`, along with
+their conversion into Powershell:
+
+| Ruby Type | Powershell Type |
+|-------------------------------------|-----------------|
+| Fixnum | Integer |
+| Float | Double |
+| FalseClass | bool($false) |
+| TrueClass | bool($true) |
+| Chef::Util::Powershell:PSCredential | PSCredential |
+| Hash | Hashtable |
+| Array | Object[] |
+
+- `module_name` is the name of the module that the DSC resource comes from. If it is not provided, it will
+ be inferred.
+
+#### Actions
+
+|Action|Description|
+|------|------------------------|
+|`:run`| Invoke the DSC resource|
+
+#### Example
+
+```ruby
+dsc_resource "demogroupremove" do
+ resource :group
+ property :groupname, 'demo1'
+ property :ensure, 'present'
+end
+
+dsc_resource "useradd" do
+ resource :user
+ property :username, "Foobar1"
+ property :fullname, "Foobar1"
+ property :password, ps_credential("P@assword!")
+ property :ensure, 'present'
+end
+
+dsc_resource "AddFoobar1ToUsers" do
+ resource :Group
+ property :GroupName, "demo1"
+ property :MembersToInclude, ["Foobar1"]
+end
+```