From 256fdf4d5bf2c946ecace18de3a6abb8988e715f Mon Sep 17 00:00:00 2001
From: Chris Coley <chris@codingallnight.com>
Date: Fri, 29 Jun 2018 22:59:22 -0700
Subject: [PATCH] Add support for Fedora, Redhat, and Centos

---
 tasks/install-postfix.fedora.yml | 8 ++++++++
 tasks/install-postfix.redhat.yml | 9 +++++++++
 vars/redhat.yml                  | 9 +++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 tasks/install-postfix.fedora.yml
 create mode 100644 tasks/install-postfix.redhat.yml
 create mode 100644 vars/redhat.yml

diff --git a/tasks/install-postfix.fedora.yml b/tasks/install-postfix.fedora.yml
new file mode 100644
index 0000000..5a4b301
--- /dev/null
+++ b/tasks/install-postfix.fedora.yml
@@ -0,0 +1,8 @@
+---
+- name: Install Postfix and related packages
+  dnf:
+    name: '{{ item }}'
+    state: present
+  with_items: '{{["postfix", "make"] + postfix__recommended_packages }}'
+...
+# vi: set ts=2 sts=2 sw=2 et ft=yaml:
diff --git a/tasks/install-postfix.redhat.yml b/tasks/install-postfix.redhat.yml
new file mode 100644
index 0000000..580fcb3
--- /dev/null
+++ b/tasks/install-postfix.redhat.yml
@@ -0,0 +1,9 @@
+---
+- name: Install Postfix and related packages
+  yum:
+    name: '{{ item }}'
+    state: present
+    update_cache: yes
+  with_items: '{{["postfix", "make"] + postfix__recommended_packages }}'
+...
+# vi: set ts=2 sts=2 sw=2 et ft=yaml:
diff --git a/vars/redhat.yml b/vars/redhat.yml
new file mode 100644
index 0000000..e64316c
--- /dev/null
+++ b/vars/redhat.yml
@@ -0,0 +1,9 @@
+---
+# This file overrides variables set in defaults/main.yml.
+# Full documentation of the variables is available in the file.
+
+postfix__recommended_packages:
+  - cyrus-sasl-plain # Most third-party mail servers support PLAIN auth
+  - mailx
+...
+# vi: set ts=2 sts=2 sw=2 et ft=yaml:
-- 
GitLab