Skip to content

Commit

Permalink
Added support for Fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Apr 10, 2017
1 parent 35edee8 commit 3c42624
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ postfix_tls_generate: False
postfix_ssl_subject: ""
postfix_tls_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
postfix_tls_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key"

postfix_postalias: "{% if ansible_os_family == 'Debian' %}/usr/sbin/postaliases{% else %}/usr/sbin/postalias{% endif %}"
4 changes: 3 additions & 1 deletion tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
when: _postfix_generic is defined and _postfix_generic.changed

- name: Configure postfix pt. 6
command: /usr/sbin/postaliases /etc/aliases creates=/etc/aliases.db
command: "{{ postfix_postalias }} /etc/aliases"
args:
creates: /etc/aliases.db

- name: Configure postfix local user relay
template: src=virtual.j2 dest=/etc/postfix/virtual-pcre owner=root group=root mode=0644
Expand Down
5 changes: 3 additions & 2 deletions tasks/install.yum.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---

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

- name: Install DKIM requirements (RedHat)
yum: name=opendkim
package: name=opendkim
when: postfix_dkim

0 comments on commit 3c42624

Please sign in to comment.