Переглянути джерело

Safer symlink creation and downloaded file removal

Justin Plock 11 роки тому
джерело
коміт
d3499da52e
Аккаунт користувача з таким Email не знайдено
1 змінених файлів з 6 додано та 3 видалено
  1. 6
    3
      roles/webmail/tasks/roundcube.yml

+ 6
- 3
roles/webmail/tasks/roundcube.yml Переглянути файл

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

Завантаження…
Відмінити
Зберегти