Преглед изворни кода

install Dovecot from wheezy-backports on wheezy, specifying default_release

Alex Payne пре 9 година
родитељ
комит
34448d5d34
1 измењених фајлова са 20 додато и 6 уклоњено
  1. 20
    6
      roles/mailserver/tasks/dovecot.yml

+ 20
- 6
roles/mailserver/tasks/dovecot.yml Прегледај датотеку

@@ -1,5 +1,9 @@
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 7
   with_items:
4 8
     - dovecot-core
5 9
     - dovecot-imapd
@@ -7,11 +11,10 @@
7 11
     - dovecot-managesieved
8 12
     - dovecot-pgsql
9 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 18
   with_items:
16 19
     - dovecot-core
17 20
     - dovecot-imapd
@@ -19,6 +22,17 @@
19 22
     - dovecot-managesieved
20 23
     - dovecot-pgsql
21 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 36
     - postgresql-9.3
23 37
   when: ansible_distribution_release == 'trusty'
24 38
 

Loading…
Откажи
Сачувај