Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This idea has been discussed, there was even a PoC patch which would allow this sort of templating using jinja2 (https://review.openstack.org/#/c/41858/), but currently the answer is no, this is not possible in HOT, and there are no immediate plans to add advanced templating or program-control primitives to HOT like for loops.

The issue is that we have to weigh up the advantages of adding functionality to the HOT DSL, over the complexity and ovehead involved in maintaining it (and as mentioned in the review above, security concerns in the case of some feature-rich templating engines)

For now, I would suggest you have a simple wrapper script which mechanically generates your template, this should be very simple, e.g in python or shell script.