HI i am new to jinja2 and trying to use regular expression as shown below
{% if ansible_hostname == \'uat\' %} {% set server = \'thinkingmonster.com\' %}
This is rather ugly, but it works as of 1.6.
{% if server|regex_replace('.*thinking.*','matched') == 'matched' %} {% set ssl_certificate = 'akash' %} {% elif server|regex_replace('.*sleeping.*','matched') == 'matched' %} {% set ssl_certificate = 'akashthakur' %} {% endif %}