2014-04-23 21:02:09 +02:00
|
|
|
# Managed by config management
|
2015-08-31 22:34:51 +02:00
|
|
|
{% set virtual = salt['pillar.get']('postfix:virtual',{}) -%}
|
|
|
|
{# to have virtual file emptied, just set an empty key 'virtual' -#}
|
|
|
|
{% if virtual is iterable -%}
|
|
|
|
{% for key, value in virtual.iteritems() -%}
|
|
|
|
{# Mutiple values available for single key in virtual alias maps - ie for dist groups -#}
|
|
|
|
{# We test if list was provided as value, and iterate if so -#}
|
|
|
|
{% if value is iterable and value is not string -%}
|
|
|
|
{% for item in value -%}
|
|
|
|
{{key }} {{ item }}
|
|
|
|
{% endfor -%}
|
|
|
|
{% else -%}
|
|
|
|
{# ..otherwise expect it to be just a string for the value -#}
|
2015-09-08 14:33:06 +02:00
|
|
|
{{ key }} {{ value }}
|
2015-08-31 22:34:51 +02:00
|
|
|
{% endif -%}
|
|
|
|
{% endfor -%}
|
|
|
|
{% endif -%}
|