Saltstack: Passing objects to templates

Posted on May 12, 2014

Quick one. When you pass a variable like this to a template through the context/default parameter it is iterpreted as a literal string:

Which means that you end up with errors like this: Unable to manage file: Jinja variable 'unicode object' has no attribute 'control_port

To pass the object itself in you need to put it in the braces: