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

Properly set the roundcube database password

Justin Plock 10 роки тому
джерело
коміт
1bd900bfae
Аккаунт користувача з таким Email не знайдено

+ 5
- 1
roles/webmail/handlers/main.yml Переглянути файл

@@ -1,5 +1,9 @@
1 1
 - name: reconfigure roundcube db
2
-  action: shell dbconfig-generate-include /etc/dbconfig-common/roundcube.conf /etc/roundcube/debian-db.php
2
+  command: /usr/sbin/dbconfig-generate-include /etc/dbconfig-common/roundcube.conf /etc/roundcube/debian-db.php
3
+  notify: set roundcube password
4
+
5
+- name: set roundcube password
6
+  command: sudo -u {{ db_admin_username }} psql -d {{ webmail_db_database }} -c "ALTER USER {{ webmail_db_username }} with password '{{ webmail_db_password }}';"
3 7
   notify: import sql carddav
4 8
 
5 9
 - name: import sql carddav

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

@@ -17,11 +17,8 @@
17 17
 - name: Decompress carddav plugin source
18 18
   command: tar xzf carddav_{{ carddav_version }}.tar.gz chdir=/root creates=/root/rcmcarddav-carddav_{{ carddav_version }}
19 19
 
20
-- name: Create /usr/share/roundcube/plugins/carddav
21
-  file: state=directory path=/usr/share/roundcube/plugins/carddav
22
-
23
-- name: Copy carddav plugin files to /usr/share/roundcube/plugins/carddav
24
-  shell: cp -R rcmcarddav-carddav_{{ carddav_version }}/* /usr/share/roundcube/plugins/carddav/ chdir=/root
20
+- name: Move carddav plugin files to /usr/share/roundcube/plugins/carddav
21
+  command: mv rcmcarddav-carddav_{{ carddav_version }} /usr/share/roundcube/plugins/carddav chdir=/root creates=/usr/share/roundcube/plugins/carddav
25 22
 
26 23
 - name: Link carddav plugin into /var/lib/roundcube/plugins
27 24
   file: state=link src=/usr/share/roundcube/plugins/carddav dest=/var/lib/roundcube/plugins/carddav force=yes
@@ -29,9 +26,6 @@
29 26
 - name: Remove downloaded carddav plugin file
30 27
   file: state=absent path=/root/carddav_{{ carddav_version }}.tar.gz
31 28
 
32
-- name: Remove extracted carddav plugin files
33
-  file: state=absent path=/root/rcmcarddav-carddav_{{ carddav_version }} recurse=true
34
-
35 29
 - name: Configure the Apache HTTP server for roundcube
36 30
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes
37 31
 

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