jinja2

Python: Using Python, JSON, and Jinja2 to construct a set of Logstash filters

Python is a language whose advantages are well documented, and the fact that it has become ubiquitous on most Linux distributions  makes it well suited for quick scripting duties. In this article I’ll go through an example of using Python to read entries from a JSON file, and from each of those entries create a Python: Using Python, JSON, and Jinja2 to construct a set of Logstash filters

SaltStack: Setting a jinja2 variable from an inner block scope

When using jinja2 for SaltStack formulas you may be surprised to find that your global scoped variables do not have ability to be modified inside a loop.  Although this is counter intuitive given the scope behavior of most scripting languages it is unfortunately the case that a jinja2 globally scoped variable cannot be modified from SaltStack: Setting a jinja2 variable from an inner block scope