Açıklama Yok
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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. - name: Add backports for Roundcube on Debian
  2. lineinfile: dest=/etc/apt/sources.list line="deb http://http.debian.net/debian wheezy-backports main"
  3. when: ansible_distribution_release == 'wheezy'
  4. tags:
  5. - dependencies
  6. - name: Update apt cache for backports
  7. apt: update_cache=yes
  8. tags:
  9. - dependencies
  10. - name: Install Roundcube from wheezy-backports
  11. apt: pkg={{ item }} state=latest default_release=wheezy-backports
  12. with_items:
  13. - roundcube
  14. - roundcube-pgsql
  15. - roundcube-plugins
  16. when: ansible_distribution_release == 'wheezy'
  17. tags:
  18. - dependencies
  19. - name: Install Roundcube on Ubuntu 14.04 LTS
  20. apt: pkg={{ item }} state=latest
  21. with_items:
  22. - roundcube
  23. - roundcube-pgsql
  24. - roundcube-plugins
  25. when: ansible_distribution_release == 'trusty'
  26. tags:
  27. - dependencies
  28. - name: Configure Roundcube database
  29. template: src={{ item.src }} dest={{ item.dest }} group={{ item.group }} mode={{ item.mode }} owner=root force=yes
  30. with_items:
  31. - { src: 'etc_dbconfig-common_roundcube.conf.j2', dest: '/etc/dbconfig-common/roundcube.conf', group: 'root', mode: 600 }
  32. - { src: 'etc_roundcube_debian-db.php.j2', dest: '/etc/roundcube/debian-db.php', group: 'www-data', mode: 640 }
  33. notify: set roundcube password
  34. - name: Download carddav plugin release
  35. get_url:
  36. url=https://github.com/blind-coder/rcmcarddav/archive/carddav_{{ carddav_version }}.tar.gz
  37. dest=/root/carddav_{{ carddav_version }}.tar.gz
  38. - name: Decompress carddav plugin source
  39. unarchive: src=/root/carddav_{{ carddav_version }}.tar.gz
  40. dest=/root copy=no
  41. creates=/root/rcmcarddav-carddav_{{ carddav_version }}
  42. - name: Move carddav plugin files to /usr/share/roundcube/plugins/carddav
  43. command: mv rcmcarddav-carddav_{{ carddav_version }} /usr/share/roundcube/plugins/carddav chdir=/root creates=/usr/share/roundcube/plugins/carddav
  44. - name: Download Google Authenticator roundcube plugin
  45. git: repo=https://github.com/alexandregz/twofactor_gauthenticator.git
  46. dest=/usr/share/roundcube/plugins/twofactor_gauthenticator
  47. accept_hostkey=yes
  48. version=master
  49. - name: Link plugins into /var/lib/roundcube/plugins
  50. file: state=link src=/usr/share/roundcube/plugins/{{ item }} dest=/var/lib/roundcube/plugins/{{ item }} force=yes
  51. with_items:
  52. - carddav
  53. - twofactor_gauthenticator
  54. - name: Rename existing Apache roundcube virtualhost
  55. command: mv /etc/apache2/sites-available/roundcube /etc/apache2/sites-available/roundcube.conf removes=/etc/apache2/sites-available/roundcube
  56. - name: Remove old sites-enabled/roundcube symlink (new one will be created by a2ensite)
  57. file: path=/etc/apache2/sites-enabled/roundcube state=absent
  58. - name: Configure the Apache HTTP server for roundcube
  59. template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube.conf group=root owner=root force=yes
  60. - name: Enable php5-mcrypt
  61. file: src=/etc/php5/mods-available/mcrypt.ini dest=/etc/php5/apache2/conf.d/20-mcrypt.ini owner=root group=root state=link
  62. - name: Configure roundcube
  63. copy: src={{ item.src }} dest={{ item.dest }} group=www-data owner=root mode=640 force=yes
  64. with_items:
  65. - { src: 'etc_roundcube_global.sieve', dest: '/etc/roundcube/global.sieve' }
  66. - { src: 'etc_roundcube_main.inc.php', dest: '/etc/roundcube/main.inc.php' }
  67. - { src: 'usr_share_roundcube_plugins_carddav_config.inc.php', dest: '/usr/share/roundcube/plugins/carddav/config.inc.php' }
  68. - { src: 'usr_share_roundcube_plugins_managesieve_config.inc.php', dest: '/usr/share/roundcube/plugins/managesieve/config.inc.php' }
  69. - { src: 'usr_share_roundcube_plugins_twofactor_gauthenticator_config.inc.php', dest: '/usr/share/roundcube/plugins/twofactor_gauthenticator/config.inc.php' }
  70. - name: Enable roundcube site
  71. command: a2ensite roundcube.conf creates=/etc/apache2/sites-enabled/roundcube.conf
  72. notify: restart apache