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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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: Set server parameter for Roundcube
  36. debconf:
  37. name: roundcube-core
  38. question: roundcube/hosts
  39. value: "ssl://{{ webmail_domain }}:993"
  40. vtype: string
  41. notify: apply roundcube config
  42. - name: Set language for Roundcube
  43. debconf:
  44. name: roundcube-core
  45. question: roundcube/language
  46. value: "{{ webmail_language }}"
  47. vtype: string
  48. notify: apply roundcube config
  49. - name: Install Roundcube configuration
  50. template:
  51. src=etc_roundcube_config.inc.j2
  52. dest=/etc/roundcube/config.inc.php
  53. - name: Configure Apache sites for Roundcube
  54. template:
  55. src=etc_apache2_sites-available_roundcube.j2
  56. dest=/etc/apache2/sites-available/mail_{{ item.name }}.conf
  57. owner=root
  58. group=root
  59. force=yes
  60. with_items: "{{ virtual_domains }}"
  61. notify: restart apache
  62. - name: Enable Roundcube sites
  63. command: a2ensite mail_{{ item }}.conf creates=/etc/apache2/sites-enabled/mail_{{ item }}.conf
  64. with_items: "{{ virtual_domains | json_query('[*].name') }}"
  65. notify: restart apache