Browse Source

Skip a2enmod and a2ensite tasks if not required

Benny 11 years ago
parent
commit
c63c48d159
1 changed files with 9 additions and 6 deletions
  1. 9
    6
      roles/owncloud/tasks/owncloud.yml

+ 9
- 6
roles/owncloud/tasks/owncloud.yml View File

24
   command: mv /var/www/owncloud/data /decrypted/owncloud-data creates=/decrypted/owncloud-data
24
   command: mv /var/www/owncloud/data /decrypted/owncloud-data creates=/decrypted/owncloud-data
25
 - file: src=/decrypted/owncloud-data dest=/var/www/owncloud/data owner=www-data group=www-data state=link
25
 - file: src=/decrypted/owncloud-data dest=/var/www/owncloud/data owner=www-data group=www-data state=link
26
 
26
 
27
-- name: Enable Apache module dependencies for ownCloud
28
-  command: a2enmod $item
29
-  with_items:
30
-    - rewrite
31
-    - headers
27
+- name: Enable Apache rewrite module
28
+  command: a2enmod rewrite creates=/etc/apache2/mods-enabled/rewrite.load
29
+  notify: restart apache
30
+  
31
+- name: Enable Apache headers module
32
+  command: a2enmod headers creates=/etc/apache2/mods-enabled/headers.load
32
   notify: restart apache
33
   notify: restart apache
33
 
34
 
34
 - name: Configure the Apache HTTP server for ownCloud
35
 - name: Configure the Apache HTTP server for ownCloud
35
   template: src=etc_apache2_sites-available_owncloud.j2 dest=/etc/apache2/sites-available/owncloud group=www-data owner=www-data
36
   template: src=etc_apache2_sites-available_owncloud.j2 dest=/etc/apache2/sites-available/owncloud group=www-data owner=www-data
36
-- command: a2ensite owncloud
37
+
38
+- name: Enable the owncloud site
39
+  command: a2ensite owncloud creates=/etc/apache2/sites-enabled/owncloud
37
   notify: restart apache
40
   notify: restart apache
38
 
41
 
39
 - name: Install ownCloud cronjob
42
 - name: Install ownCloud cronjob

Loading…
Cancel
Save