User Tools

Site Tools


automation:jinja2

This is an old revision of the document!


JINYA
It uses a template file (jinja) and a templating code (in python) but it might be easier to use Ansible instead of the python code (see External Link).

VARIABLE

  time-zone {{ location.time_zone }};

FOR LOOP

  {% for name_server in location.name_servers %}
      {{ name_server }};
  {% endfor %}

IF STATEMENTS

{% if item[0] is short_caption %}
{# do something here #}
{% endif %}
automation/jinja2.1495894054.txt.gz · Last modified: (external edit)