Нема описа
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.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ---
  2. # Installs and configures the Roundcube webmail interface.
  3. - name: Install Roundcube and related packages
  4. apt:
  5. name: "{{ packages }}"
  6. state: present
  7. vars:
  8. packages:
  9. - roundcube
  10. - roundcube-core
  11. - roundcube-pgsql
  12. - roundcube-plugins
  13. - roundcube-plugins-extra
  14. tags:
  15. - dependencies
  16. - name: Make logs and temp directories writable by web server
  17. file: path=/var/lib/roundcube/{{ item }} mode=0775 state=directory
  18. with_items:
  19. - temp
  20. - logs
  21. - name: Make roundcube directory accessible to web server
  22. file: path=/var/lib/roundcube group=www-data recurse=yes state=directory
  23. - name: Install sieve plugin configuration
  24. copy: src=etc_roundcube_plugins_managesieve_config.inc.php
  25. dest=/etc/roundcube/plugins/managesieve/config.inc.php
  26. owner=root
  27. group=www-data
  28. mode=0644
  29. - name: Install global sieve
  30. copy: src=etc_roundcube_global.sieve
  31. dest=/etc/roundcube/global.sieve
  32. owner=root
  33. group=www-data
  34. mode=0644
  35. - name: Install roundcube logrotate
  36. copy: src=etc_logrotate.d_roundcube-core
  37. dest=/etc/logrotate.d/roundcube-core
  38. owner=root
  39. group=root
  40. mode=0644
  41. - name: Set server parameter for Roundcube
  42. debconf:
  43. name: roundcube-core
  44. question: roundcube/hosts
  45. value: "ssl://{{ webmail_domain }}:993"
  46. vtype: string
  47. notify: apply roundcube config
  48. - name: Set language for Roundcube
  49. debconf:
  50. name: roundcube-core
  51. question: roundcube/language
  52. value: "{{ webmail_language }}"
  53. vtype: string
  54. notify: apply roundcube config
  55. - name: Install Roundcube configuration
  56. template:
  57. src=etc_roundcube_config.inc.j2
  58. dest=/etc/roundcube/config.inc.php
  59. - name: Configure Apache sites for Roundcube
  60. template:
  61. src=etc_apache2_sites-available_roundcube.j2
  62. dest=/etc/apache2/sites-available/mail_{{ item.name }}.conf
  63. owner=root
  64. group=root
  65. force=yes
  66. with_items: "{{ virtual_domains }}"
  67. notify: restart apache
  68. - name: Enable Roundcube sites
  69. command: a2ensite mail_{{ item }}.conf creates=/etc/apache2/sites-enabled/mail_{{ item }}.conf
  70. with_items: "{{ virtual_domains | json_query('[*].name') }}"
  71. notify: restart apache