summaryrefslogtreecommitdiff
path: root/RELEASE_NOTES.md
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-08-25 13:35:56 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-08-25 13:35:56 -0700
commit64dc435268f8d994c6ac414657d26d8abb1ac410 (patch)
tree8e919cb8460c7e6ac7c66b6e66da04052b61b8dc /RELEASE_NOTES.md
parentd2102fdf7451029622a23883dc1fb262b9930abb (diff)
downloadchef-64dc435268f8d994c6ac414657d26d8abb1ac410.tar.gz
Add release notes for dsc_script + ps_credential
Diffstat (limited to 'RELEASE_NOTES.md')
-rw-r--r--RELEASE_NOTES.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index c32309064a..cba5b9f415 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,6 +1,46 @@
# Chef Client Release Notes 12.5.0:
* OSX 10.11 support (support for SIP and service changes)
+## PSCredential support for the `dsc_script` resource
+
+The `dsc_script` resource now supports the use of the `ps_credential`
+helper method. This method generates a Ruby object which can be described
+as a Powershell PSCredential object. For example, if you wanted to created
+a user using DSC, previously you would have had to do something like:
+
+```ruby
+dsc_script 'create-foo-user' do
+ code <<-EOH
+ $username = "placeholder"
+ $password = "#{FooBarBaz1!}" | ConvertTo-SecureString -asPlainText -Force
+ $cred = New-Object System.Management.Automation.PSCredential($username, $password)
+ User FooUser00
+ {
+ Ensure = "Present"
+ UserName = 'FooUser00'
+ Password = $cred
+ }
+ EOH
+ configuration_data_script "path/to/config/data.psd1"
+end
+```
+
+This can now be replaced with
+
+```ruby
+dsc_script 'create-foo-user' do
+ code <<-EOH
+ User FooUser00
+ {
+ Ensure = "Present"
+ UserName = 'FooUser00'
+ Password = #{ps_credential("FooBarBaz1!")}
+ }
+ EOH
+ configuration_data_script "path/to/config/data.psd1"
+end
+```
+
## New `knife rehash` for faster command loading
The new `knife rehash` command speeds up day-to-day knife usage by