windos_feature problem

In my cookbook I have this :

if win_version.windows_server_2012? || win_version.windows_server_2012_r2?
windows_feature “NetFx3ServerFeatures” do
source node.sensu.windows.dism_source
end
end

Got error :

[2014-11-17T15:20:55+00:00] ERROR: Running exception handlers
[2014-11-17T15:20:55+00:00] ERROR: Exception handlers complete
[2014-11-17T15:20:55+00:00] FATAL: Stacktrace dumped to
c:/chef/cache/chef-stacktrace.out
[2014-11-17T15:20:55+00:00] FATAL: NoMethodError: undefined method `source’
for Chef::Resource::WindowsFeature

full stacktrace here https://gist.github.com/bigmyx/44a7596b00b95dbcf5a2

Please help.


Michael L.

On Nov 17, 2014, at 10:31 AM, Michael Leikind bigmyx@gmail.com wrote:

In my cookbook I have this :

if win_version.windows_server_2012? || win_version.windows_server_2012_r2?
windows_feature "NetFx3ServerFeatures" do
source node.sensu.windows.dism_source
end
end

...

Got error :

[2014-11-17T15:20:55+00:00] ERROR: Running exception handlers
[2014-11-17T15:20:55+00:00] ERROR: Exception handlers complete
[2014-11-17T15:20:55+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
[2014-11-17T15:20:55+00:00] FATAL: NoMethodError: undefined method `source' for Chef::Resource::WindowsFeature

‘windows_feature’ doesn’t take ‘source’ as a parameter. It just asks DISM to install the feature for you.

  • Julian