No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

roundcube.yml 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. - name: Install Roundcube
  2. apt: pkg={{ item }} state=latest
  3. with_items:
  4. - roundcube
  5. - roundcube-pgsql
  6. - roundcube-plugins
  7. tags:
  8. - dependencies
  9. - name: Configure Roundcube database
  10. template: src={{ item.src }} dest={{ item.dest }} group={{ item.group }} mode={{ item.mode }} owner=root force=yes
  11. with_items:
  12. - { src: 'etc_dbconfig-common_roundcube.conf.j2', dest: '/etc/dbconfig-common/roundcube.conf', group: 'root', mode: 600 }
  13. - { src: 'etc_roundcube_debian-db.php.j2', dest: '/etc/roundcube/debian-db.php', group: 'www-data', mode: 640 }
  14. notify: set roundcube password
  15. - name: Download carddav plugin release
  16. get_url:
  17. url=https://github.com/blind-coder/rcmcarddav/archive/carddav_{{ carddav_version }}.tar.gz
  18. dest=/root/carddav_{{ carddav_version }}.tar.gz
  19. - name: Decompress carddav plugin source
  20. unarchive: src=/root/carddav_{{ carddav_version }}.tar.gz
  21. dest=/root copy=no
  22. creates=/root/rcmcarddav-carddav_{{ carddav_version }}
  23. - name: Move carddav plugin files to /usr/share/roundcube/plugins/carddav
  24. command: mv rcmcarddav-carddav_{{ carddav_version }} /usr/share/roundcube/plugins/carddav chdir=/root creates=/usr/share/roundcube/plugins/carddav
  25. - name: Download Google Authenticator roundcube plugin
  26. git: repo=https://github.com/alexandregz/twofactor_gauthenticator.git
  27. dest=/usr/share/roundcube/plugins/twofactor_gauthenticator
  28. accept_hostkey=yes
  29. version=master
  30. - name: Link plugins into /var/lib/roundcube/plugins
  31. file: state=link src=/usr/share/roundcube/plugins/{{ item }} dest=/var/lib/roundcube/plugins/{{ item }} force=yes
  32. with_items:
  33. - carddav
  34. - twofactor_gauthenticator
  35. - name: Rename existing Apache roundcube virtualhost
  36. command: mv /etc/apache2/sites-available/roundcube /etc/apache2/sites-available/roundcube.conf removes=/etc/apache2/sites-available/roundcube
  37. - name: Remove old sites-enabled/roundcube symlink (new one will be created by a2ensite)
  38. file: path=/etc/apache2/sites-enabled/roundcube state=absent
  39. - name: Configure the Apache HTTP server for roundcube
  40. template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube.conf group=root owner=root force=yes
  41. - name: Enable php5-mcrypt
  42. file: src=/etc/php5/mods-available/mcrypt.ini dest=/etc/php5/apache2/conf.d/20-mcrypt.ini owner=root group=root state=link
  43. - name: Configure roundcube
  44. copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
  45. with_items:
  46. - { src: 'etc_roundcube_global.sieve', dest: '/etc/roundcube/global.sieve' }
  47. - { src: 'etc_roundcube_main.inc.php', dest: '/etc/roundcube/main.inc.php' }
  48. - { src: 'usr_share_roundcube_plugins_carddav_config.inc.php', dest: '/usr/share/roundcube/plugins/carddav/config.inc.php' }
  49. - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php', dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
  50. - { src: 'usr_share_roundcube_plugins_twofactor_gauthenticator_config.inc.php', dest: '/usr/share/roundcube/plugins/twofactor_gauthenticator/config.inc.php' }
  51. - name: Enable roundcube site
  52. command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
  53. notify: restart apache