Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 783 Bytes
layout title excerpt category
post
Attributes and string interpolation in Chef
Attributes and string interpolation in Chef
blog

When your attributes contain a lot of string interpolation it can be confusing to know why some note attributes have one variable and other have another. This is due to when the attributes file is evaluated.

The latest java cookbook creates the string attributes in a recipe vs. the attribute file, which can alleviate some of these issues.

Recipe to set attributes:
https://github.com/socrata-cookbooks/java/blob/master/recipes/set_attributes_from_version.rb

Attributes with no string interpolation:
https://github.com/socrata-cookbooks/java/blob/master/attributes/default.rb