설명 없음
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.2KB

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