Skip to content

Instantly share code, notes, and snippets.

@Dmitri10
Dmitri10 / opt1_template.j2
Created September 22, 2017 08:52 — forked from halberom/opt1_template.j2
ansible - example of template if else
{% if filepath == /var/opt/tomcat_1 %}
{% set tomcat_value == tomcat_1_value %}
{% else %}
{% set tomcat_value == tomcat_2_value %}
{% endif %}
<Server port={{ tomcat_value }} shutdown="SHUTDOWN">