summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2018-12-03 03:21:42 +0100
committerGuilhem Moulin <guilhem@fripost.org>2018-12-03 03:43:42 +0100
commitcfedc9e785831d54195b120300932f74f9808daf (patch)
tree3f906311a6d2a7340b9d9012f23c07c95e8015b2 /roles/IMAP/tasks
parentf01876604da167b36780e53ce54cd89c8f9d5f85 (diff)
Upgrade syntax to Ansible 2.7 (apt module).
Diffstat (limited to 'roles/IMAP/tasks')
-rw-r--r--roles/IMAP/tasks/imap.yml5
-rw-r--r--roles/IMAP/tasks/mda.yml5
-rw-r--r--roles/IMAP/tasks/spam.yml5
3 files changed, 9 insertions, 6 deletions
diff --git a/roles/IMAP/tasks/imap.yml b/roles/IMAP/tasks/imap.yml
index 75b250d..18aa910 100644
--- a/roles/IMAP/tasks/imap.yml
+++ b/roles/IMAP/tasks/imap.yml
@@ -1,23 +1,24 @@
- name: Install Dovecot
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- dovecot-core
- dovecot-ldap
- dovecot-imapd
- dovecot-lmtpd
- dovecot-antispam
- dovecot-managesieved
- dovecot-sieve
- name: Create a user 'vmail'
user: name=vmail system=yes
createhome=no
home=/home/mail
shell=/usr/sbin/nologin
password=!
state=present
- name: Copy dovecot auth proxy
copy: src=usr/local/bin/dovecot-auth-proxy.pl
dest=/usr/local/bin/dovecot-auth-proxy.pl
owner=root group=staff
diff --git a/roles/IMAP/tasks/mda.yml b/roles/IMAP/tasks/mda.yml
index 1510103..f705fe7 100644
--- a/roles/IMAP/tasks/mda.yml
+++ b/roles/IMAP/tasks/mda.yml
@@ -1,23 +1,24 @@
- name: Install Postfix
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
- postfix
- postfix-ldap
- name: Configure Postfix
template: src=etc/postfix/{{ item }}.j2
dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }}
owner=root group=root
mode=0644
with_items:
- main.cf
- master.cf
notify:
- Reload Postfix
- name: Copy the transport and recipient canonical maps
copy: src=etc/postfix/{{ item }}
dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }}
owner=root group=root
mode=0644
with_items:
diff --git a/roles/IMAP/tasks/spam.yml b/roles/IMAP/tasks/spam.yml
index 3091b85..c275b55 100644
--- a/roles/IMAP/tasks/spam.yml
+++ b/roles/IMAP/tasks/spam.yml
@@ -1,23 +1,24 @@
- name: Install spamassassin
- apt: pkg={{ item }}
- with_items:
+ apt: pkg={{ packages }}
+ vars:
+ packages:
# The following two lines are for the policy lookup (made by amavis)
- libnet-ldap-perl
- libauthen-sasl-perl
- razor
- spamassassin
- spamc
- libdbi-perl
- re2c
- libc6-dev
- gcc
- make
notify:
- Compile Spamassassin rules
- Restart Amavis
- name: Create a 'spamassassin' database
mysql_db: name=spamassassin state=present
encoding=latin1 collation=latin1_general_ci
notify:
- Copy SQL tables for spamassassin