ansible-role-mailserver/tasks/main.yml

44 lines
753 B
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
import_tasks: db.yml
- name: Run postfixadmin
import_tasks: postfixadmin.yml
- name: Run dovecot
import_tasks: dovecot.yml
- name: Run rspamd
import_tasks: rspamd.yml
when: mailserver_rspamd_enabled
- name: Run mailman
import_tasks: mailman.yml
- name: Run postfix
import_tasks: postfix.yml