Browse Source

Add support for Apache 2.4 on Ubuntu 14.04

Lorenzo Villani 10 years ago
parent
commit
e7703d0d9c
2 changed files with 21 additions and 1 deletions
  1. 10
    0
      roles/common/tasks/main.yml
  2. 11
    1
      roles/mailserver/tasks/z-push.yml

+ 10
- 0
roles/common/tasks/main.yml View File

46
 - name: Set ServerName for Apache
46
 - name: Set ServerName for Apache
47
   template: src=fqdn.j2 dest=/etc/apache2/conf.d/fqdn
47
   template: src=fqdn.j2 dest=/etc/apache2/conf.d/fqdn
48
   notify: restart apache
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
 - include: encfs.yml tags=encfs
60
 - include: encfs.yml tags=encfs
51
 - include: users.yml tags=users
61
 - include: users.yml tags=users

+ 11
- 1
roles/mailserver/tasks/z-push.yml View File

36
 - name: Configure z-push apache alias and php settings
36
 - name: Configure z-push apache alias and php settings
37
   copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf.d/z-push.conf
37
   copy: src=etc_apache2_conf.d_z-push.conf dest=/etc/apache2/conf.d/z-push.conf
38
   notify: restart apache
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
 - name: Configure z-push logrotate
50
 - name: Configure z-push logrotate
41
   copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push owner=root group=root mode=0644
51
   copy: src=etc_logrotate_z-push dest=/etc/logrotate.d/z-push owner=root group=root mode=0644

Loading…
Cancel
Save