From 82951ff4f9f998b36dfc64d11fc3bcdef37f4589 2015-04-07 22:59:49 From: Branko Majic Date: 2015-04-07 22:59:49 Subject: [PATCH] MAR-4: Added initial implementation for mail server role. Includes deployment of packages and purging of Exim4 configuration. Dovecot packages installed from backports. --- diff --git a/roles/mail_server/handlers/main.yml b/roles/mail_server/handlers/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..bafaad728b5694ed2993a08058147fc5111e8d9e --- /dev/null +++ b/roles/mail_server/handlers/main.yml @@ -0,0 +1,4 @@ +--- + +- name: Purge Exim configuration + apt: name="exim4*" state=absent purge=yes \ No newline at end of file diff --git a/roles/mail_server/tasks/main.yml b/roles/mail_server/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..b0a5a0e7c9a83b691c8a92f70705ba3e37de83e4 --- /dev/null +++ b/roles/mail_server/tasks/main.yml @@ -0,0 +1,24 @@ +--- + +- name: Add backports repository + apt_repository: repo="deb http://http.debian.net/debian wheezy-backports main" state=present + +- name: Install Dovecot packages + apt: name="{{ item }}" state=installed default_release="wheezy-backports" + with_items: + - dovecot-imapd + - dovecot-ldap + - dovecot-sieve + - dovecot-managesieved + +- name: Install Postfix packages + apt: name="{{ item }}" state=installed + with_items: + - postfix + - postfix-ldap + notify: + - Purge Exim configuration + +- name: Install SWAKS + apt: name="swaks" state=installed +