Complete Ansible role for configuring a full-featured Postfix SMTP server with TLS, SASL authentication, aliases, virtual aliases, transport maps, canonical rewrites, and relay host support. Can be used directly via Ansible Galaxy.
# 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.
# tasks file
---
- name: facts | set
tags:
- configuration
- postfix
- postfix-facts
block:
- name: facts | set | is_docker_guest
ansible.builtin.set_fact:
is_docker_guest: "{{ ansible_facts['virtualization_role'] | default('host') == 'guest' and ansible_facts['virtualization_type'] | default('none') == 'docker' }}"
- name: facts | set | postfix_relayhosts
ansible.builtin.set_fact:
postfix_relayhosts: ["{{ postfix_relayhost }}"]
when:
- postfix_relayhosts | length == 0
- postfix_relayhost is defined
- name: configure debconf
ansi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key