Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

roundcube.yml 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. - name: Install Roundcube
  2. apt: pkg={{ item }} state=latest
  3. with_items:
  4. - roundcube
  5. - roundcube-pgsql
  6. - roundcube-plugins
  7. - name: Configure Roundcube database
  8. template: src={{ item.src }} dest={{ item.dest }} group={{ item.group }} mode={{ item.mode }} owner=root force=yes
  9. with_items:
  10. - { src: 'etc_dbconfig-common_roundcube.conf.j2', dest: '/etc/dbconfig-common/roundcube.conf', group: 'root', mode: 600 }
  11. - { src: 'etc_roundcube_debian-db.php.j2', dest: '/etc/roundcube/debian-db.php', group: 'www-data', mode: 640 }
  12. notify: set roundcube password
  13. - name: Download carddav plugin release
  14. get_url:
  15. url=https://github.com/blind-coder/rcmcarddav/archive/carddav_{{ carddav_version }}.tar.gz
  16. dest=/root/carddav_{{ carddav_version }}.tar.gz
  17. - name: Decompress carddav plugin source
  18. command: tar xzf carddav_{{ carddav_version }}.tar.gz chdir=/root creates=/root/rcmcarddav-carddav_{{ carddav_version }}
  19. - name: Move carddav plugin files to /usr/share/roundcube/plugins/carddav
  20. command: mv rcmcarddav-carddav_{{ carddav_version }} /usr/share/roundcube/plugins/carddav chdir=/root creates=/usr/share/roundcube/plugins/carddav
  21. - name: Download Google Authenticator roundcube plugin
  22. git: repo=https://github.com/alexandregz/twofactor_gauthenticator.git
  23. dest=/usr/share/roundcube/plugins/twofactor_gauthenticator
  24. accept_hostkey=yes
  25. - name: Link plugins into /var/lib/roundcube/plugins
  26. file: state=link src=/usr/share/roundcube/plugins/{{ item }} dest=/var/lib/roundcube/plugins/{{ item }} force=yes
  27. with_items:
  28. - carddav
  29. - twofactor_gauthenticator
  30. - name: Rename existing Apache roundcube virtualhost
  31. command: mv /etc/apache2/sites-available/roundcube /etc/apache2/sites-available/roundcube.conf removes=/etc/apache2/sites-available/roundcube
  32. - name: Remove old sites-enabled/roundcube symlink (new one will be created by a2ensite)
  33. command: rm /etc/apache2/sites-enabled/roundcube removes=/etc/apache2/sites-enabled/roundcube
  34. - name: Configure the Apache HTTP server for roundcube
  35. template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube.conf group=root owner=root force=yes
  36. - name: Configure roundcube
  37. copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
  38. with_items:
  39. - { src: 'etc_roundcube_global.sieve', dest: '/etc/roundcube/global.sieve' }
  40. - { src: 'etc_roundcube_main.inc.php', dest: '/etc/roundcube/main.inc.php' }
  41. - { src: 'usr_share_roundcube_plugins_carddav_config.inc.php', dest: '/usr/share/roundcube/plugins/carddav/config.inc.php' }
  42. - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php', dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
  43. - { src: 'usr_share_roundcube_plugins_twofactor_gauthenticator_config.inc.php', dest: '/usr/share/roundcube/plugins/twofactor_gauthenticator/config.inc.php' }
  44. - name: Enable roundcube site
  45. command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
  46. notify: restart apache