ansible-role-dovecot/tasks/main.yml
Adrien d565b8fcc1
All checks were successful
continuous-integration/drone/push Build is passing
fix lint
2020-06-04 20:37:07 +02:00

39 lines
794 B
YAML

---
- name: Include vars for {{ ansible_os_family }}
include_vars: "{{ ansible_os_family }}.yml"
- name: Install packages for dovecot
package:
name: "{{ dovecot_packages }}"
state: present
update_cache: yes
- name: Deploy configuration
template:
src: etc/dovecot/{{ item }}.j2
dest: /etc/dovecot/{{ item }}
owner: root
group: root
mode: 0644
with_items:
# - dovecot.conf
- conf.d/10-auth.conf
- conf.d/10-logging.conf
- conf.d/10-mail.conf
- conf.d/10-master.conf
- conf.d/10-ssl.conf
notify: Restart dovecot
- name: Open Firewalld
firewalld:
service: imaps
permanent: true
state: enabled
immediate: true
- name: Enable dovecot at boot time
service:
name: dovecot
enabled: yes
state: started