How to add multiple jvm options in a saltstack jinja? I have a config.jinja file with below jvm options:

`-Dappdynamics.agent.appName=AP_{{ pillar['region'] }}`


However the AP_{{ pillar['region'] }} varies for different environments. For Dev/Prod it can be AP_{{ pillar['region'] }} and for QA it must be AP without the pillar value.
How can I define the appName option with multiple values to achieve above? Any suggestions?

if (pillar['region'] == QA)
   -Dappdynamics.agent.applicationName=ALIP
else
   -Dappdynamics.agent.applicationName=ALIP_{{ pillar['region'] }}
end-if
Perhaps a macro might be what you are looking for.

Understanding Jinja:Macros

In the lib.sls example in the link (pasted below), it sets a value contingent on the value of the if statement.  I think a similar approach could work for you.

{% macro pythonpkg(pkg) -%}
  {%- if grains['os'] == 'FreeBSD' -%}
    py27-{{ pkg }}
  {%- elif grains['os'] == 'Debian' -%}
    python-{{ pkg }}
  {%- endif -%}
{%- endmacro %}