Jinja2

If

1
2
3
     {% if inventory_hostname  in  groups['qa-hosts'] or inventory_hostname in  groups['prprod-hosts'] %}
 {% elif .... %}
 {% endif %}