Browse Source

install Dovecot from wheezy-backports on wheezy, specifying default_release

Alex Payne 9 years ago
parent
commit
5222776e34
1 changed files with 13 additions and 1 deletions
  1. 13
    1
      roles/mailserver/tasks/dovecot.yml

+ 13
- 1
roles/mailserver/tasks/dovecot.yml View File

2
   apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main'
2
   apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main'
3
   when: ansible_distribution_release == 'wheezy'
3
   when: ansible_distribution_release == 'wheezy'
4
 
4
 
5
-- name: Install Dovecot and related packages
5
+- name: Install Dovecot and related packages on Debian 7
6
+  apt: pkg={{ item }} update_cache=yes state=installed default_release=wheezy-backports
7
+  with_items:
8
+    - dovecot-core
9
+    - dovecot-imapd
10
+    - dovecot-lmtpd
11
+    - dovecot-managesieved
12
+    - dovecot-pgsql
13
+    - dovecot-pop3d
14
+  when: ansible_distribution_release == 'wheezy'
15
+
16
+- name: Install Dovecot and related packages on distributions other than Debian 7
6
   apt: pkg={{ item }} update_cache=yes state=installed
17
   apt: pkg={{ item }} update_cache=yes state=installed
7
   with_items:
18
   with_items:
8
     - dovecot-core
19
     - dovecot-core
11
     - dovecot-managesieved
22
     - dovecot-managesieved
12
     - dovecot-pgsql
23
     - dovecot-pgsql
13
     - dovecot-pop3d
24
     - dovecot-pop3d
25
+  when: ansible_distribution_release != 'wheezy'
14
 
26
 
15
 - name: Install Dovecot Postgres dependency for distributions other than Ubuntu Trusty
27
 - name: Install Dovecot Postgres dependency for distributions other than Ubuntu Trusty
16
   apt: pkg={{ item }} state=installed
28
   apt: pkg={{ item }} state=installed

Loading…
Cancel
Save