Files
no-secrets-athq-ansible/roles/mail/tasks/main.yaml
2023-01-09 21:55:03 +01:00

46 lines
862 B
YAML

- name: Install Mail stuff
apt:
pkg:
- postfix
- dovecot-core
- dovecot-imapd
- spamassassin
- nginx
state: present
- name: Deploy Postfix config
copy:
src: "{{ item }}"
dest: "/etc/postfix/{{ item }}"
with_items:
- dynamicmaps.cf
- enabled_senders
- main.cf
- master.cf
- relocated
- sender_blacklist
- tls_policy
- transport
- virtual
notify: restart postfix
- name: Deploy Dovecot config
copy:
src: "{{ item }}"
dest: "/etc/dovecot/{{ item }}"
with_items:
- dovecot.conf
notify: restart dovecot
- name: Deploy nginx-config
copy:
src: nginx.conf
dest: /etc/nginx/nginx.conf
notify: restart nginx
- name: Deploy nginx-config (page)
copy:
src: nginx_default.conf
dest: /etc/nginx/sites-available/default
notify: restart nginx