ansible-role-postfix/templates/postfix/conf.d/virtual_aliases.j2
phil 8c79f8b687 Use Ansible defaults to insert comments
Enable vscodium code highlighting for some files
2024-03-27 17:39:16 +01:00

27 lines
557 B
Django/Jinja

{{ ansible_managed | comment }}
# Example
#
# postfix_aliases:
# - domain:
# name: mydomain.org
# comment: |
# # Mydomain.org
# # List of Aliases
# aliases:
# - name: foo
# dest:
# - "alice@yourdomain.org
{% if postfix_aliases is defined %}
{% for item in postfix_aliases %}
### {{ item.domain }}
{% if item.comment is defined %}
{{ item.comment }}
{% endif %}
{% for alias in item.aliases %}
{{ "%-50s %s" | format(alias.name + '@' + item.domain, alias.dest | join(',')) }}
{% endfor %}
{% endfor %}
{% endif %}