Browse Source

Properly set the roundcube database password

Justin Plock 10 years ago
parent
commit
1bd900bfae
No account linked to committer's email address
2 changed files with 7 additions and 9 deletions
  1. 5
    1
      roles/webmail/handlers/main.yml
  2. 2
    8
      roles/webmail/tasks/roundcube.yml

+ 5
- 1
roles/webmail/handlers/main.yml View File

1
 - name: reconfigure roundcube db
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
   notify: import sql carddav
7
   notify: import sql carddav
4
 
8
 
5
 - name: import sql carddav
9
 - name: import sql carddav

+ 2
- 8
roles/webmail/tasks/roundcube.yml View File

17
 - name: Decompress carddav plugin source
17
 - name: Decompress carddav plugin source
18
   command: tar xzf carddav_{{ carddav_version }}.tar.gz chdir=/root creates=/root/rcmcarddav-carddav_{{ carddav_version }}
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
 - name: Link carddav plugin into /var/lib/roundcube/plugins
23
 - name: Link carddav plugin into /var/lib/roundcube/plugins
27
   file: state=link src=/usr/share/roundcube/plugins/carddav dest=/var/lib/roundcube/plugins/carddav force=yes
24
   file: state=link src=/usr/share/roundcube/plugins/carddav dest=/var/lib/roundcube/plugins/carddav force=yes
29
 - name: Remove downloaded carddav plugin file
26
 - name: Remove downloaded carddav plugin file
30
   file: state=absent path=/root/carddav_{{ carddav_version }}.tar.gz
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
 - name: Configure the Apache HTTP server for roundcube
29
 - name: Configure the Apache HTTP server for roundcube
36
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes
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
 

Loading…
Cancel
Save