Reputation: 648
Should a Chef custom resource use Chef attributes as default property values? I can see several options here:
What's the best practice here?
Upvotes: 2
Views: 1439
Reputation: 54181
I go with option 3: https://github.com/poise/poise-monit/blob/master/chef/recipes/default.rb#L17-L22
I will sometimes use node attributes directly in resources or providers if it is something that has to be truly global, but I can only think of a handful of cases where that has been the case.
Upvotes: 3