Browse Source

Add a 2FA plugin for Roundcube (fixes #201)

Justin Plock 10 years ago
parent
commit
408d83341f
No account linked to committer's email address

+ 1
- 1
roles/webmail/files/etc_roundcube_main.inc.php View File

@@ -362,7 +362,7 @@ $rcmail_config['email_dns_check'] = false;
362 362
 // ----------------------------------
363 363
 
364 364
 // List of active plugins (in plugins/ directory)
365
-$rcmail_config['plugins'] = array('managesieve', 'carddav');
365
+$rcmail_config['plugins'] = array('managesieve', 'carddav', 'twofactor_gauthenticator');
366 366
 
367 367
 // ----------------------------------
368 368
 // USER INTERFACE

+ 3
- 0
roles/webmail/files/usr_share_roundcube_plugins_twofactor_gauthenticator_config.inc.php View File

@@ -0,0 +1,3 @@
1
+<?php
2
+// if true ALL users must have 2-steps active
3
+$rcmail_config['force_enrollment_users'] = false;

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

@@ -23,11 +23,14 @@
23 23
 - name: Move carddav plugin files to /usr/share/roundcube/plugins/carddav
24 24
   command: mv rcmcarddav-carddav_{{ carddav_version }} /usr/share/roundcube/plugins/carddav chdir=/root creates=/usr/share/roundcube/plugins/carddav
25 25
 
26
-- 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
26
+- name: Download Google Authenticator roundcube plugin
27
+  git: repo=https://github.com/alexandregz/twofactor_gauthenticator.git dest=/usr/share/roundcube/plugins/twofactor_gauthenticator
28 28
 
29
-#- name: Remove downloaded carddav plugin file
30
-#  file: state=absent path=/root/carddav_{{ carddav_version }}.tar.gz
29
+- name: Link plugins into /var/lib/roundcube/plugins
30
+  file: state=link src=/usr/share/roundcube/plugins/{{ item }} dest=/var/lib/roundcube/plugins/{{ item }} force=yes
31
+  with_items:
32
+    - carddav
33
+    - twofactor_gauthenticator
31 34
 
32 35
 - name: Configure the Apache HTTP server for roundcube
33 36
   template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes
@@ -35,10 +38,11 @@
35 38
 - name: Configure roundcube
36 39
   copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
37 40
   with_items:
38
-  - { src: 'etc_roundcube_main.inc.php',                             dest: '/etc/roundcube/main.inc.php' }
39
-  - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php', dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
40
-  - { src: 'usr_share_roundcube_plugins_carddav_config.inc.php',     dest: '/usr/share/roundcube/plugins/carddav/config.inc.php' }
41
-  - { src: 'etc_roundcube_global.sieve',                             dest: '/etc/roundcube/global.sieve' }
41
+  - { src: 'etc_roundcube_main.inc.php',                                          dest: '/etc/roundcube/main.inc.php' }
42
+  - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php',              dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
43
+  - { src: 'usr_share_roundcube_plugins_carddav_config.inc.php',                  dest: '/usr/share/roundcube/plugins/carddav/config.inc.php' }
44
+  - { src: 'usr_share_roundcube_plugins_twofactor_gauthenticator_config.inc.php', dest: '/usr/share/roundcube/plugins/twofactor_gauthenticator/config.inc.php' }
45
+  - { src: 'etc_roundcube_global.sieve',                                          dest: '/etc/roundcube/global.sieve' }
42 46
 
43 47
 - name: Enable roundcube site
44 48
   command: a2ensite roundcube creates=/etc/apache2/sites-enabled/roundcube

Loading…
Cancel
Save