1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- - name: Install Roundcube
- apt: pkg={{ item }} state=latest
- with_items:
- - roundcube
- - roundcube-plugins
- - roundcube-pgsql
-
- - name: Configure Roundcube database
- template: src=etc_dbconfig-common_roundcube.conf.j2 dest=/etc/dbconfig-common/roundcube.conf group=root owner=root force=yes
- notify: reconfigure roundcube db
-
- - name: Download carddav plugin release
- get_url:
- url=https://github.com/blind-coder/rcmcarddav/archive/carddav_{{ carddav_version }}.tar.gz
- dest=/root/carddav_{{ carddav_version }}.tar.gz
-
- - name: Decompress carddav plugin source
- command: tar xzf carddav_{{ carddav_version }}.tar.gz chdir=/root creates=/root/rcmcarddav-carddav_{{ carddav_version }}
-
- - name: Move carddav plugin files to /usr/share/roundcube/plugins/carddav
- command: mv rcmcarddav-carddav_{{ carddav_version }} /usr/share/roundcube/plugins/carddav chdir=/root creates=/usr/share/roundcube/plugins/carddav
-
- - name: Link carddav plugin into /var/lib/roundcube/plugins
- file: state=link src=/usr/share/roundcube/plugins/carddav dest=/var/lib/roundcube/plugins/carddav force=yes
-
- - name: Remove downloaded carddav plugin file
- file: state=absent path=/root/carddav_{{ carddav_version }}.tar.gz
-
- - name: Configure the Apache HTTP server for roundcube
- template: src=etc_apache2_sites-available_roundcube.j2 dest=/etc/apache2/sites-available/roundcube group=www-data owner=www-data force=yes
-
- - name: Configure roundcube
- copy: src=etc_roundcube_main.inc.php dest=/etc/roundcube/main.inc.php group=www-data owner=root mode=640 force=yes
-
- - name: Configure roundcube's managesieve plugin
- copy: src=usr_share_roundcube_plugins_managesieve_config.inc.php dest=/usr/share/roundcube/plugins/managesieve/config.inc.php group=www-data owner=root mode=640 force=yes
-
- - name: Configure roundcube's carddav plugin
- copy: src=usr_share_roundcube_plugins_carddav_config.inc.php dest=/usr/share/roundcube/plugins/carddav/config.inc.php group=www-data owner=root mode=640 force=yes
-
- - name: Copy global default sieve rules
- copy: src=etc_roundcube_global.sieve dest=/etc/roundcube/global.sieve owner=root group=www-data mode=640
-
- - name: Enable roundcube site
- command: a2ensite roundcube creates=/etc/apache2/sites-enabled/roundcube
- notify: restart apache
|