I have a large (hundreds of properties, dozens of templates) set of templates I’m porting from Nant to Chef. The properties in the old system are scattered across multiple files and while aggregating the properties into data bags and adjusting the templates, I have missed some values.
The call in the recipe to merge each template with the properties from the data bags works, but values that are not present in the hash are simply empty in the generated template. The substitution fails silently.
For example, if I have this in the template:
… and the ‘foobar’ key/value pair is not present, I wind up with this in the generated file:
Is there any way to get Chef to throw a warning or error in this case?