forked from mauro/ansible-role-dovecot
progreso (aun no probado)
This commit is contained in:
@@ -1,24 +1,42 @@
|
||||
---
|
||||
- apt: name=dovecot-ldap
|
||||
when: dovecot_auth_ldap_enable
|
||||
|
||||
- apt: name=dovecot-pop3d
|
||||
when: dovecot_proto_pop3_enable or dovecot_proto_pop3s_enable
|
||||
- name: Instalar Dovecot
|
||||
apt:
|
||||
state: present
|
||||
name:
|
||||
- dovecot-lmtpd
|
||||
{% if any([dovecot_proto_imap_enable, dovecot_proto_imaps_enable]) -%}
|
||||
- dovecot-imapd
|
||||
{% endif %}
|
||||
{% if any([dovecot_proto_pop3_enable, dovecot_proto_pop3s_enable]) -%}
|
||||
- dovecot-pop3d
|
||||
{% endif %}
|
||||
{% if dovecot_ldap_enable -%}
|
||||
- dovecot-ldap
|
||||
{% endif %}
|
||||
{% if dovecot_sieve_enable -%}
|
||||
- dovecot-sieve
|
||||
{% endif %}
|
||||
{% if dovecot_proto_managesieve_enable -%}
|
||||
- dovecot-managesieved
|
||||
{% endif %}
|
||||
{% if dovecot_antispam_enable -%}
|
||||
- dovecot-antispam
|
||||
{% endif %}
|
||||
|
||||
- apt: name=dovecot-imapd
|
||||
when: dovecot_proto_imap_enable or dovecot_proto_imapd_enable
|
||||
- name: Directorios de configuración de Dovecot
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
loop:
|
||||
- /etc/dovecot/conf.d
|
||||
- "{{ dovecot_sieve_before }}"
|
||||
- "{{ dovecot_sieve_after }}"
|
||||
|
||||
- apt: name=dovecot-lmtpd
|
||||
|
||||
- apt: name=dovecot-managesieved
|
||||
when: dovecot_proto_managesieve_enable
|
||||
|
||||
- apt: name=dovecot-antispam
|
||||
when: dovecot_plugin_antispam_enable
|
||||
|
||||
- name: Configuración de Dovecot
|
||||
template: dest="/etc/dovecot/conf.d/{{item}}" src="{{item}}.j2"
|
||||
with_items:
|
||||
- name: Configuración de Dovecot (1)
|
||||
template:
|
||||
dest: "/etc/dovecot/conf.d/{{ item }}"
|
||||
src: "{{item}}.j2"
|
||||
loop:
|
||||
- 10-mail.conf
|
||||
- 10-auth.conf
|
||||
- 10-ssl.conf
|
||||
@@ -31,27 +49,22 @@
|
||||
- 90-quota.conf
|
||||
- 90-antispam.conf
|
||||
notify: restart dovecot
|
||||
|
||||
- name: configuracion dovecot-ldap
|
||||
|
||||
- name: Configuración de Dovecot (2-LDAP)
|
||||
template:
|
||||
dest: "/etc/dovecot/dovecot-ldap.conf.ext"
|
||||
src: "dovecot-ldap.conf.ext.j2"
|
||||
notify: restart dovecot
|
||||
|
||||
- name: enlace simbólico a dovecot-ldap.conf.ext
|
||||
- name: Configuración de Dovecot (3-LDAP)
|
||||
file:
|
||||
src: dovecot-ldap.conf.ext
|
||||
dest: /etc/dovecot/dovecot-ldap2.conf.ext
|
||||
state: link
|
||||
notify: restart dovecot
|
||||
|
||||
- file: path={{ dovecot_plugin_sieve.after }} state=directory
|
||||
when: dovecot_plugin_sieve_enable
|
||||
|
||||
- file: path={{ dovecot_plugin_sieve.before }} state=directory
|
||||
when: dovecot_plugin_sieve_enable
|
||||
|
||||
- name: filtro spam global en sieve-after
|
||||
template: src=junk-filter.sieve.j2 dest={{dovecot_plugin_sieve.after}}/junk-filter.sieve
|
||||
when: dovecot_plugin_sieve_enable
|
||||
- name: Filtro de spam global
|
||||
template:
|
||||
src: junk-filter.sieve.j2
|
||||
dest: "{{ dovecot_sieve_before }}/junk-filter.sieve"
|
||||
notify: recompile sieve scripts
|
||||
|
||||
Reference in New Issue
Block a user