瀏覽代碼

Add support for Apache 2.4 on Ubuntu 14.04

Lorenzo Villani 10 年之前
父節點
當前提交
e7703d0d9c
共有 2 個文件被更改,包括 21 次插入1 次删除
  1. 10
    0
      roles/common/tasks/main.yml
  2. 11
    1
      roles/mailserver/tasks/z-push.yml

+ 10
- 0
roles/common/tasks/main.yml 查看文件

@@ -46,6 +46,16 @@
46 46
 - name: Set ServerName for Apache
47 47
   template: src=fqdn.j2 dest=/etc/apache2/conf.d/fqdn
48 48
   notify: restart apache
49
+  when: ansible_distribution_release != 'trusty'
50
+
51
+- name: Create ServerName configuration file for Apache for Ubuntu Trusty
52
+  template: src=fqdn.j2 dest=/etc/apache2/conf-available/fqdn.conf
53
+  when: ansible_distribution_release == 'trusty'
54
+
55
+- name: Set ServerName for Apache for Ubuntu Trusty
56
+  command: a2enconf fqdn creates=/etc/apache2/conf-enabled/fqdn.conf
57
+  notify: restart apache
58
+  when: ansible_distribution_release == 'trusty'
49 59
 
50 60
 - include: encfs.yml tags=encfs
51 61
 - include: users.yml tags=users

+ 11
- 1
roles/mailserver/tasks/z-push.yml 查看文件

@@ -36,6 +36,16 @@
36 36
 - name: Configure z-push apache alias and php settings
37 37
   copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf.d/z-push.conf
38 38
   notify: restart apache
39
-  
39
+  when: ansible_distribution_release != 'trusty'
40
+
41
+- name: Create z-push apache alias and php configuration file for Ubuntu Trusty
42
+  copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf-available/z-push.conf
43
+  when: ansible_distribution_release == 'trusty'
44
+
45
+- name: Enable z-push Apache alias and PHP configuration file for Ubuntu Trusty
46
+  command: a2enconf z-push creates=/etc/apache2/conf-enabled/z-push.conf
47
+  notify: restart apache
48
+  when: ansible_distribution_release == 'trusty'
49
+
40 50
 - name: Configure z-push logrotate
41 51
   copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push owner=root group=root mode=0644

Loading…
取消
儲存