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 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. - name: Determine whether roundcube is configured
  2. stat: path=/var/www/roundcube/config.inc.php
  3. register: roundcube_config
  4. - name: Install roundcube dependencies
  5. apt: pkg={{ item }} state=present
  6. with_items:
  7. - php5
  8. - php5-sqlite
  9. - php5-mcrypt
  10. - php5-gd
  11. - php5-pspell
  12. - php5-intl
  13. - php5-curl
  14. - aspell
  15. - aspell-en
  16. tags:
  17. - dependencies
  18. - name: Clone roundcube
  19. git: repo=https://github.com/roundcube/roundcubemail.git
  20. dest=/var/www/roundcube
  21. version={{ webmail_version }}
  22. update=no
  23. accept_hostkey=yes
  24. - name: Get Composer installer
  25. get_url: url=https://getcomposer.org/installer
  26. dest=/tmp/composer-installer
  27. - name: Copy composer configuration
  28. copy: src=var_www_roundcube_composer.json dest=/var/www/roundcube/composer.json
  29. owner=root
  30. group=www-data
  31. mode=0644
  32. - name: Install Composer
  33. command: php /tmp/composer-installer
  34. chdir=/root
  35. creates=/root/composer.phar
  36. - name: Initialize composer
  37. command: php /root/composer.phar install --no-dev
  38. chdir=/var/www/roundcube
  39. creates=/var/www/roundcube/vendor/autoload.php
  40. - name: Remove installer directory
  41. file: path=/var/www/roundcube/installer state=absent
  42. - name: Install Roundcube configuration
  43. template: src=var_www_roundcube_config_config.inc.j2 dest=/var/www/roundcube/config/config.inc.php
  44. - name: Create db directory
  45. file: path=/decrypted/roundcube group=www-data mode=0775 state=directory
  46. - name: Make logs and temp directories writable by web server
  47. file: path=/var/www/roundcube/{{ item }} mode=0775 state=directory
  48. with_items:
  49. - temp
  50. - logs
  51. - name: Make roundcube directory accessible to web server
  52. file: path=/var/www/roundcube group=www-data recurse=yes state=directory
  53. - name: Install sieve plugin configuration
  54. copy: src=var_www_roundcube_plugins_managesieve_config.inc.php
  55. dest=/var/www/roundcube/plugins/managesieve/config.inc.php
  56. owner=root
  57. group=www-data
  58. mode=0644
  59. - name: Install global sieve
  60. copy: src=var_www_roundcube_config_global.sieve
  61. dest=/var/www/roundcube/config/global.sieve
  62. owner=root
  63. group=www-data
  64. mode=0644
  65. - name: Install carddav plugin configuration
  66. copy: src=var_www_roundcube_plugins_carddav_config.inc.php
  67. dest=/var/www/roundcube/plugins/carddav/config.inc.php
  68. owner=root
  69. group=www-data
  70. mode=0644
  71. - name: Install Google 2-factor authentication plugin configuration
  72. copy: src=var_www_roundcube_plugins_twofactor_gauthenticator_config.inc.php
  73. dest=/var/www/roundcube/plugins/twofactor_gauthenticator/config.inc.php
  74. owner=root
  75. group=www-data
  76. mode=0644
  77. - name: Configure Apache for Roundcube
  78. template: src=etc_apache2_sites-available_roundcube.j2
  79. dest=/etc/apache2/sites-available/roundcube.conf
  80. group=root owner=root force=yes
  81. - name: Enable Roundcube site
  82. command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
  83. notify: restart apache