Manages /etc/aliases (system mail aliases) with support for both hash and regexp database types. Handles postmap for hash type, supports regexp alias pattern matching.
// Source: https://github.com/Oefenweb/ansible-postfix | License: MIT | Copyright Oefenweb.nl <https://github.com/Oefenweb>
// Provided via justclaw.it.com; keep this notice with the code.
{{ ansible_managed | comment }}
# See man 5 aliases for format
{% if postfix_aliases_database_type == 'regexp' %}
{% for alias in postfix_aliases %}
{{ alias.user }} {{ alias.alias }}
{% endfor %}
{% else %}
postmaster: root
{% for alias in postfix_aliases %}
{{ alias.user }}: {{ alias.alias }}
{% endfor %}
{% endif %}
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key