Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load package list per OS (to support RHEL 8) #27

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions tasks/install.deb.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
---

- name: Install requirements (Debian)
apt: name={{item}} update_cache=yes
with_items:
- postfix
- ca-certificates
- mailutils
- libsasl2-modules
apt:
name: "{{ postfix_packages }}"
update_cache: yes

- name: Install DKIM requirements (Debian)
apt: name={{item}}
apt:
name: "{{ postfix_dkim_packages }}"
when: postfix_dkim
with_items:
- opendkim
- opendkim-tools

- name: Install postfix-pcre
apt: pkg=postfix-pcre
apt:
name: "{{ postfix_pcre_package }}"
when: postfix_rewrite_sender_address != "" or postfix_local_user_relay_address != ""
16 changes: 9 additions & 7 deletions tasks/install.yum.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---

- name: Install requirements (RedHat)
package: name={{item}}
with_items:
- postfix
- ca-certificates
- mailx
- libselinux-python
package:
name: "{{ postfix_packages }}"

- name: Install DKIM requirements (RedHat)
package: name=opendkim
package:
name: "{{ postfix_dkim_packages }}"
when: postfix_dkim

- name: Install postfix-pcre
package:
name: "{{ postfix_pcre_package }}"
when: postfix_rewrite_sender_address != "" or postfix_local_user_relay_address != ""
7 changes: 7 additions & 0 deletions tasks/postfix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---

- name: Include package list per OS
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_os_family }}.yml"

- import_tasks: install.deb.yml
when: ansible_os_family == 'Debian'
tags: [postfix]
Expand Down
13 changes: 13 additions & 0 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

postfix_packages:
- postfix
- ca-certificates
- mailutils
- libsasl2-modules

postfix_dkim_packages:
- opendkim
- opendkim-tools

postfix_pcre_package: postfix-pcre
12 changes: 12 additions & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

postfix_packages:
- postfix
- ca-certificates
- mailx
- libselinux-python

postfix_dkim_packages:
- opendkim

postfix_pcre_package: postfix
12 changes: 12 additions & 0 deletions vars/RedHat_8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

postfix_packages:
- postfix
- ca-certificates
- mailx
- python3-libselinux

postfix_dkim_packages:
- opendkim

postfix_pcre_package: postfix-pcre