Bläddra i källkod

Merge pull request #175 from jplock/jp-carddav-safer-link

Safer symlink creation and downloaded file removal
Luke Cyca 11 år sedan
förälder
incheckning
ade428dfe2
1 ändrade filer med 6 tillägg och 3 borttagningar
  1. 6
    3
      roles/webmail/tasks/roundcube.yml

+ 6
- 3
roles/webmail/tasks/roundcube.yml Visa fil

23
   shell: cp -R rcmcarddav-carddav_{{ carddav_version }}/* /usr/share/roundcube/plugins/carddav/ chdir=/root
23
   shell: cp -R rcmcarddav-carddav_{{ carddav_version }}/* /usr/share/roundcube/plugins/carddav/ chdir=/root
24
 
24
 
25
 - name: Link carddav plugin into /var/lib/roundcube/plugins
25
 - name: Link carddav plugin into /var/lib/roundcube/plugins
26
-  shell: ln -s /usr/share/roundcube/plugins/carddav chdir=/var/lib/roundcube/plugins
26
+  file: state=link src=/usr/share/roundcube/plugins/carddav dest=/var/lib/roundcube/plugins/carddav force=yes
27
 
27
 
28
-- name: Remove downloaded, temporary carddav plugin source files
29
-  shell: rm -rf rcmcarddav-carddav_* carddav_* chdir=/root
28
+- name: Remove downloaded carddav plugin file
29
+  file: state=absent path=/root/carddav_{{ carddav_version }}.tar.gz
30
+
31
+- name: Remove extracted carddav plugin files
32
+  file: state=absent path=/root/rcmcarddav-carddav_{{ carddav_version }} recurse=true
30
 
33
 
31
 - name: Configure the Apache HTTP server for roundcube
34
 - name: Configure the Apache HTTP server for roundcube
32
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes
35
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes

Laddar…
Avbryt
Spara