based on the following values โโof the downloadable book.
target: "actual.domain.com" aliases: - "alias1.domain.com" - "alias2.domain.com"
I am trying to configure an indispensable template for creating nginx server_name which in this case should be:
server_name: "actual.domain.com alias1.domain.com alias2.domain.com"
So, I tried the following jinja2 script ...
{% if item.aliases is defined %} {% set servername = [ item.target ] %} {% for alias in item.aliases.iteritems() %} {% if alias|length > 0 %} {% servername|join(' '), alias %} # <= line 30 {% endif %} {% endfor %} server_name {{ servername }}; {% else %} server_name {{ item.target }}; {% endif %} ....
but it does not work, line number: 30, error: Unknown tag 'servername'
Where can I be wrong?
Thanks for the help and HNY!
erwin source share