Browse Source

install Dovecot from wheezy-backports on wheezy, specifying default_release

Alex Payne 9 years ago
parent
commit
34448d5d34
1 changed files with 20 additions and 6 deletions
  1. 20
    6
      roles/mailserver/tasks/dovecot.yml

+ 20
- 6
roles/mailserver/tasks/dovecot.yml View File

1
-- name: Install Dovecot and related packages for distributions other than Ubuntu Trusty
2
-  apt: pkg={{ item }} state=installed
1
+- name: Add wheezy-backports to get a reasonably current Dovecot on Debian 7
2
+  apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main'
3
+  when: ansible_distribution_release == 'wheezy'
4
+
5
+- name: Install Dovecot and related packages on Debian 7
6
+  apt: pkg={{ item }} update_cache=yes state=installed default_release=wheezy-backports
3
   with_items:
7
   with_items:
4
     - dovecot-core
8
     - dovecot-core
5
     - dovecot-imapd
9
     - dovecot-imapd
7
     - dovecot-managesieved
11
     - dovecot-managesieved
8
     - dovecot-pgsql
12
     - dovecot-pgsql
9
     - dovecot-pop3d
13
     - dovecot-pop3d
10
-    - postgresql-9.1
11
-  when: ansible_distribution_release != 'trusty'
14
+  when: ansible_distribution_release == 'wheezy'
12
 
15
 
13
-- name: Install Dovecot and related packages for Ubuntu trusty
14
-  apt: pkg={{ item }} state=installed
16
+- name: Install Dovecot and related packages on distributions other than Debian 7
17
+  apt: pkg={{ item }} update_cache=yes state=installed
15
   with_items:
18
   with_items:
16
     - dovecot-core
19
     - dovecot-core
17
     - dovecot-imapd
20
     - dovecot-imapd
19
     - dovecot-managesieved
22
     - dovecot-managesieved
20
     - dovecot-pgsql
23
     - dovecot-pgsql
21
     - dovecot-pop3d
24
     - dovecot-pop3d
25
+  when: ansible_distribution_release != 'wheezy'
26
+
27
+- name: Install Dovecot Postgres dependency for distributions other than Ubuntu Trusty
28
+  apt: pkg={{ item }} state=installed
29
+  with_items:
30
+    - postgresql-9.1
31
+  when: ansible_distribution_release != 'trusty'
32
+
33
+- name: Install Dovecot Postgres dependency for Ubuntu trusty
34
+  apt: pkg={{ item }} state=installed
35
+  with_items:
22
     - postgresql-9.3
36
     - postgresql-9.3
23
   when: ansible_distribution_release == 'trusty'
37
   when: ansible_distribution_release == 'trusty'
24
 
38
 

Loading…
Cancel
Save