jinja2-cli
jinja2-cli copied to clipboard
Support for recursively replacing variables
Please see example in tests.
I am not convinced this is the correct way to go about it though.
What's the usecase for this? I get what it's doing, I just can't think of why I'd want to use this.
I was trying to use the tool on this template using this yml which didn't work as expected. This is an ansible template which uses Jinja2 with support for recursive evaluation.
I'm going to probably pull this in later. Do you have a preference on it being a CLI argument? To be, it seems like we could just allow this behavior all the time. I don't see any real cases where this would cause an issue unexpectedly.
I'd vote to have it available all the time, i.e. directly integrated in the jinja lib. I've had to implement a similar thing in a python script of mine, whereas I could have just added a recursive=True param to the template.render() call if this had been available.
Hi all, any chance we could merge this?
Bump, this would be great