[chef] RE: RE: Re: Re: network share in windows


Chronological Thread 
  • From: Adam Edwards < >
  • To:
  • Subject: [chef] RE: RE: Re: Re: network share in windows
  • Date: Fri, 7 Nov 2014 15:44:13 -0800

You don’t have to wait for a Chef 12 release to use DSC – you can use it in a less seamless form via the dsc_script resource in Chef 11.16.0 and higher:

https://docs.getchef.com/resource_dsc_script.html

https://www.getchef.com/blog/2014/09/08/chef-11-16-gets-into-powershell-dsc/

 

You’re right Dylan that our plan is to bake in the functionality from the cookbook you reference below – it’s more seamless than dsc_script and does not require you to understand anything about the DSC / PowerShell language (you can stay strictly within the Chef DSL), you just need to understand what the DSC resources actually do to the system. Also, it doesn’t depend on the server, it’s a client feature, so expect to see the more seamless stuff in a future Chef Client release.

 

Kenneth, you can also take a look at this PR from viebrock or the windows cookbook, though I would also like to make this a native part of Chef and not some cookbook:

https://www.getchef.com/blog/2014/09/08/chef-11-16-gets-into-powershell-dsc/

 

Lastly, I happened to use file share creation as an example of a feature we introduced in Chef 11.12.0 in the release notes: https://github.com/opscode/chef/blob/11.12.0/RELEASE_NOTES.md

 

powershell_script 'make_logshare' do

  guard_interpreter :powershell_script

  code 'new-smbshare logshare $env:systemdrive\\logs'

  not_if 'get-smbshare logshare'

end

 

-Adam

 

 

 

 

From: Dylan K. Grafmyre [mailto: "> ]
Sent: Friday, November 7, 2014 3:33 PM
To: ">
Subject: [chef] RE: Re: Re: network share in windows

 

I think you just need WMF4.0/Powershell 4.0 on your system to use DSC_Resource.

 

http://docs.getchef.com/resource_dsc_resource.html

https://github.com/opscode-cookbooks/dsc

 

I believe Chef Server 12 will have the DSC_Resource baked in without needing the DSC Cookbook, but I could be totally wrong about this?

 

Aloha,

Dylan Grafmyre

Tech Partners Hawaii

808-877-5557 x 104

">

 

From: Kenneth Barry [ ">mailto: ]
Sent: Friday, November 7, 2014 1:16 PM
To: ">
Subject: [chef] Re: Re: network share in windows

 

I thought that was only with the new chef server?

We are on 11.4

 

On Fri, Nov 7, 2014 at 2:53 PM, Dylan K. Grafmyre < " target="_blank"> > wrote:

How about using the DSC cookbook and DSC resource xSMBShare to create the shares?

 

https://gallery.technet.microsoft.com/scriptcenter/xSmbShare-PowerShell-cafb8ba6

Dylan Grafmyre

IT Support

Tech Partners Hawaii

808-877-5557 ext 104

Sent from my iPhone


On Nov 7, 2014, at 12:48 PM, Kenneth Barry < " target="_blank"> > wrote:

I can't find a cookbook/resource for creating network shares. Anyone aware of one? I hate doing things in script if i can avoid it.......

 

--

Kenneth Barry 

TuneIn | Build and Release Engineer

M: 409-673-0544



 

--

Kenneth Barry 

TuneIn | Build and Release Engineer

M: 409-673-0544




Archive powered by MHonArc 2.6.16.

§