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.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 (PHP5 variant)
  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. when: (ansible_distribution_release != "xenial" and ansible_distribution_release != "bionic" and ansible_distribution_release != "stretch")
  17. tags:
  18. - dependencies
  19. - name: Install roundcube dependencies
  20. apt: pkg={{ item }} state=present
  21. with_items:
  22. - php
  23. - php-sqlite
  24. - php-mcrypt
  25. - php-gd
  26. - php-pspell
  27. - php-intl
  28. - php-curl
  29. - aspell
  30. - aspell-en
  31. when: (ansible_distribution_release == "xenial" or ansible_distribution_release == "bionic" or ansible_distribution_release == "stretch")
  32. tags:
  33. - dependencies
  34. - name: Clone roundcube
  35. git: repo=https://github.com/roundcube/roundcubemail.git
  36. dest=/var/www/roundcube
  37. version={{ webmail_version }}
  38. update=no
  39. accept_hostkey=yes
  40. - name: Get Composer installer
  41. get_url: url=https://getcomposer.org/installer
  42. dest=/tmp/composer-installer
  43. - name: Copy composer configuration
  44. copy: src=var_www_roundcube_composer.json dest=/var/www/roundcube/composer.json
  45. owner=root
  46. group=www-data
  47. mode=0644
  48. - name: Install Composer
  49. command: php /tmp/composer-installer
  50. chdir=/root
  51. creates=/root/composer.phar
  52. - name: Initialize composer
  53. command: php /root/composer.phar install --no-dev
  54. chdir=/var/www/roundcube
  55. creates=/var/www/roundcube/vendor/autoload.php
  56. - name: Remove installer directory
  57. file: path=/var/www/roundcube/installer state=absent
  58. - name: Install Roundcube configuration
  59. template: src=var_www_roundcube_config_config.inc.j2 dest=/var/www/roundcube/config/config.inc.php
  60. - name: Create db directory
  61. file: path=/decrypted/roundcube group=www-data mode=0775 state=directory
  62. - name: Make logs and temp directories writable by web server
  63. file: path=/var/www/roundcube/{{ item }} mode=0775 state=directory
  64. with_items:
  65. - temp
  66. - logs
  67. - name: Make roundcube directory accessible to web server
  68. file: path=/var/www/roundcube group=www-data recurse=yes state=directory
  69. - name: Install sieve plugin configuration
  70. copy: src=var_www_roundcube_plugins_managesieve_config.inc.php
  71. dest=/var/www/roundcube/plugins/managesieve/config.inc.php
  72. owner=root
  73. group=www-data
  74. mode=0644
  75. - name: Install global sieve
  76. copy: src=var_www_roundcube_config_global.sieve
  77. dest=/var/www/roundcube/config/global.sieve
  78. owner=root
  79. group=www-data
  80. mode=0644
  81. - name: Install carddav plugin configuration
  82. copy: src=var_www_roundcube_plugins_carddav_config.inc.php
  83. dest=/var/www/roundcube/plugins/carddav/config.inc.php
  84. owner=root
  85. group=www-data
  86. mode=0644
  87. - name: Install Google 2-factor authentication plugin configuration
  88. copy: src=var_www_roundcube_plugins_twofactor_gauthenticator_config.inc.php
  89. dest=/var/www/roundcube/plugins/twofactor_gauthenticator/config.inc.php
  90. owner=root
  91. group=www-data
  92. mode=0644
  93. - name: Configure Apache for Roundcube
  94. template: src=etc_apache2_sites-available_roundcube.j2
  95. dest=/etc/apache2/sites-available/roundcube.conf
  96. group=root owner=root force=yes
  97. - name: Enable Roundcube site
  98. command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
  99. notify: restart apache