64 lines
1.2 KiB
YAML
64 lines
1.2 KiB
YAML
---
|
|
- name: create vmail group
|
|
group:
|
|
name: vmail
|
|
gid: 5000
|
|
state: present
|
|
system: yes
|
|
|
|
- name: create vmail user
|
|
user:
|
|
name: vmail
|
|
uid: 5000
|
|
group: vmail
|
|
state: present
|
|
system: yes
|
|
shell: /usr/bin/nologin
|
|
home: /srv/mail
|
|
|
|
- name: get mx cert
|
|
notify: dehydrated
|
|
lineinfile:
|
|
path: /etc/dehydrated/domains.txt
|
|
line: "{{ mailserver_cert_domains }}"
|
|
|
|
- name: Run userdatabase
|
|
when: mailserver_dovecot_enabled or mailserver_roundcubemail_enabled
|
|
import_tasks: db.yml
|
|
tags:
|
|
- mail-db
|
|
- postfixadmin
|
|
- dovecot
|
|
- postfix
|
|
- roundcubemail
|
|
|
|
- name: Run postfixadmin
|
|
when: mailserver_dovecot_enabled
|
|
import_tasks: postfixadmin.yml
|
|
tags: postfixadmin
|
|
|
|
- name: Run dovecot
|
|
when: mailserver_dovecot_enabled
|
|
import_tasks: dovecot.yml
|
|
tags: dovecot
|
|
|
|
- name: Run rspamd
|
|
import_tasks: rspamd.yml
|
|
when: mailserver_rspamd_enabled
|
|
tags: rspamd
|
|
|
|
- name: Run mailman
|
|
when: mailserver_mailman_enabled
|
|
import_tasks: mailman.yml
|
|
tags: mailman
|
|
|
|
- name: Run postfix
|
|
import_tasks: postfix.yml
|
|
tags: postfix
|
|
|
|
- name: Run roundcubemail
|
|
when: mailserver_roundcubemail_enabled
|
|
import_tasks: roundcubemail.yml
|
|
tags: roundcubemail
|
|
|