Skip to content

Instantly share code, notes, and snippets.

@echohack
Created April 25, 2016 19:21
Show Gist options
  • Save echohack/a60bf9d602bdefe7e45465a45664357e to your computer and use it in GitHub Desktop.
Save echohack/a60bf9d602bdefe7e45465a45664357e to your computer and use it in GitHub Desktop.
Install all the windows features from Chef
configuration windows_features
{
foreach ($feature in @(<% node['windows_base']['features'].each_with_index do |feature, index| %>
'<%= feature %>'<% if index != node['windows_base']['features'].size - 1 %>,<% end %><% end %>))
{
WindowsFeature $feature
{
Ensure = 'Present'
Name = $feature
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment