Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

roundcube.yml 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. - name: Install Roundcube
  2. apt: pkg={{ item }} state=latest
  3. with_items:
  4. - roundcube
  5. - roundcube-plugins
  6. - roundcube-pgsql
  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_main.inc.php', dest: '/etc/roundcube/main.inc.php' }
  38. - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php', dest: '/usr/share/roundcube/plugins/managesieve/config.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_twofactor_gauthenticator_config.inc.php', dest: '/usr/share/roundcube/plugins/twofactor_gauthenticator/config.inc.php' }
  41. - { src: 'etc_roundcube_global.sieve', dest: '/etc/roundcube/global.sieve' }
  42. - name: Enable roundcube site
  43. command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
  44. notify: restart apache