Should a Chef custom resource use attributes as default property values? -


should chef custom resource use chef attributes default property values? can see several options here:

  1. have pure library cookbook, custom resources (or lwrps) ever configured writing recipe using chef dsl.
  2. have library cookbook default values properties can come chef attributes. allows users set values on chef server, long there's recipe using resources in question.
  3. have cookbook provides custom resources, has default recipe uses chef attributes fill in values. i.e. it's recipe uses attributes. in case, recipe (and attributes) in separate cookbook, seems convenient make in 1 cookbook.

what's best practice here?

i go option 3: https://github.com/poise/poise-monit/blob/master/chef/recipes/default.rb#l17-l22

i use node attributes directly in resources or providers if has global, can think of handful of cases has been case.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -