0
votes

Working with the IIS cookbook to set the shared configuration directory

iisconfigsettings.rb

...

default['iis']['conf_dir']   = "#{iis['home']}d:\\configuration"
...

This should change the configuration directory to d:\configuration.

After chef run I get FATAL: ArgumentError: You must supply a name when declaring a default resource.

I'm not sure where the name should be specified here. According to the documentation on chef, which isn't too specific I believe I have the parameters appropriate here. https://github.com/opscode-cookbooks/iis

Anyone have experience in settings this?

1
what is iisconfigsettings.rb? Is it a recipe, attribute file, something else?? - Tejay Cardon
It's a recipe in my WebServerBuild cookbook. - d_turner

1 Answers

1
votes

I think your problem is that your calling the default method in a recipe context. That appears to be attempting to create a resource of type default, and it is angry that you didn't give said resource a name. Frankly, I'm a bit baffled about exactly what's happening there, or where you got a resource with the type of default, but luckily, the solution is simple:

iisconfigsettings.rb

...
node.default['iis']['conf_dir'] = "#{iis['home']}d:\\configuration"
...

Notice that I added node. in front of default.

Also, I'm not sure what you're after with "#{iis['home']}d:\\configuration". That's not just going to give you d:\configuration, it's going to pre-pend whatever iis['home'] resolves to.