Jay Oliver
Jay Oliver

Reputation: 53

What is the proper syntax to pass installargs to a chocolatey package through Chef's chocolatey recipe?

I'm trying to install a chocolatey package through a chef script.

I need to pass it specific arguments to install the way I want, and I'm getting lost in the multiple levels of escaping going on between ruby, powershell, and whatever else may be in the mix.

Can someone tell me what exactly I need to put in my recipe to perform the equivalent of this?

cinst VisualStudio2013Professional -InstallArguments "/Features:'WebTools Win8SDK' /ProductKey:AB1CD-EF2GH-IJ3KL-MN4OP-QR5ST"

Upvotes: 0

Views: 592

Answers (1)

Matt Wrock
Matt Wrock

Reputation: 6640

The best way to use chocolatey with chef is by using the chocolatey cookbook.

Using the Chocolatey resource provided in the cookbook, you want to use the args attribute:

include_recipe 'chocolatey'

chocolatey 'VisualStudio2013Professional' do
  args "/Features:'WebTools Win8SDK' /ProductKey:AB1CD-EF2GH-IJ3KL-MN4OP-QR5ST"
end

Upvotes: 3

Related Questions