Browse Source

postfix: merge packmail role into postfix role

evolinux-users
Victor LABORIE 5 years ago
parent
commit
b31110fb85
  1. 15
      packmail/README.md
  2. 5
      packmail/defaults/main.yml
  3. 10
      packmail/handlers/main.yml
  4. 6
      packmail/meta/main.yml
  5. 34
      packmail/tasks/main.yml
  6. 0
      postfix/files/cn4evolix.ldif
  7. 1
      postfix/meta/main.yml

15
packmail/README.md

@ -1,15 +0,0 @@
# packmail
Install the mail pack, with Postfix/Dovecot/LDAP/evoadmin-mail.
## Tasks
See `tasks/main.yml`.
## Available variables
Main variables are :
* `packmail_enable_evoadmin_vhost` : enable VirtualHost for evoadmin (web interface to create mail accounts)
The full list of variables (with default values) can be found in `defaults/main.yml`.

5
packmail/defaults/main.yml

@ -1,5 +0,0 @@
---
# defaults file for packmail
general_alert_email: "root@localhost"
packmail_enable_evoadmin_vhost: True

10
packmail/handlers/main.yml

@ -1,10 +0,0 @@
---
- name: restart postfix
service:
name: postfix
state: restarted
- name: restart dovecot
service:
name: dovecot
state: restarted

6
packmail/meta/main.yml

@ -1,6 +0,0 @@
---
dependencies:
- { role: ldap, ldap_schema: 'cn4evolix.ldif' }
- { role: postfix, postfix_packmail: True, postfix_force_main_cf: True }
- { role: apache }
- { role: php, php_apache_enable: True }

34
packmail/tasks/main.yml

@ -1,34 +0,0 @@
---
- fail:
msg: only compatible with Debian >= 9
when:
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('9', '<')
- name: Additional packages are installed
apt:
name: '{{ item }}'
state: present
with_items:
- libapache2-mod-security2
- modsecurity-crs
- apg
- name: Additional modules are enabled
apache2_module:
name: '{{ item }}'
state: present
with_items:
- ssl
- include
- negotiation
- alias
- name: Install Evoadmin
include_role:
name: webapps/evoadmin-mail
vars:
evoadminmail_enable_vhost: '{{ packmail_enable_evoadmin_vhost }}'
- name: Install Roundcube
include_role:
name: webapps/roundcube

0
packmail/files/cn4evolix.ldif → postfix/files/cn4evolix.ldif

1
postfix/meta/main.yml

@ -14,6 +14,7 @@ galaxy_info:
- jessie
dependencies:
- { role: ldap, ldap_schema: 'cn4evolix.ldif', when: postfix_packmail == True }
- { role: spamassasin, when: postfix_packmail == True }
- { role: clamav, when: postfix_packmail == True }
- { role: opendkim, when: postfix_packmail == True }

Loading…
Cancel
Save