Brak opisu
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.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 dest=/usr/share/roundcube/plugins/twofactor_gauthenticator
  23. - name: Link plugins into /var/lib/roundcube/plugins
  24. file: state=link src=/usr/share/roundcube/plugins/{{ item }} dest=/var/lib/roundcube/plugins/{{ item }} force=yes
  25. with_items:
  26. - carddav
  27. - twofactor_gauthenticator
  28. - name: Rename existing Apache roundcube virtualhost
  29. command: mv /etc/apache2/sites-available/roundcube /etc/apache2/sites-available/roundcube.conf removes=/etc/apache2/sites-available/roundcube
  30. - name: Remove old sites-enabled/roundcube symlink (new one will be created by a2ensite)
  31. command: rm /etc/apache2/sites-enabled/roundcube removes=/etc/apache2/sites-enabled/roundcube
  32. - name: Configure the Apache HTTP server for roundcube
  33. template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube.conf group=root owner=root force=yes
  34. - name: Configure roundcube
  35. copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
  36. with_items:
  37. - { src: 'etc_roundcube_global.sieve', dest: '/etc/roundcube/global.sieve' }
  38. - { src: 'etc_roundcube_main.inc.php', dest: '/etc/roundcube/main.inc.php' }
  39. - { src: 'usr_share_roundcube_plugins_carddav_config.inc.php', dest: '/usr/share/roundcube/plugins/carddav/config.inc.php' }
  40. - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php', dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
  41. - { src: 'usr_share_roundcube_plugins_twofactor_gauthenticator_config.inc.php', dest: '/usr/share/roundcube/plugins/twofactor_gauthenticator/config.inc.php' }
  42. - name: Enable roundcube site
  43. command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
  44. notify: restart apache