59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
---
|
|
- name: Install Roundcube
|
|
apt:
|
|
update_cache: true
|
|
install_recommends: false
|
|
name:
|
|
- roundcube
|
|
- roundcube-pgsql
|
|
- roundcube-plugins
|
|
- roundcube-plugins-extra
|
|
- php-fpm
|
|
- php-gd
|
|
- php-pspell
|
|
- php-pgsql
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
- name: Configure Roundcube
|
|
template:
|
|
src: roundcube/{{ item }}.j2
|
|
dest: /etc/roundcube/{{ item }}
|
|
owner: root
|
|
group: www-data
|
|
mode: 0640
|
|
loop:
|
|
- debian-db.php
|
|
- config.inc.php
|
|
|
|
- name: Clone custom plugins
|
|
git:
|
|
repo: "{{ item.repo }}"
|
|
dest: /etc/roundcube/plugins/{{ item.name }}
|
|
version: "{{ item.version }}"
|
|
loop: "{{ roundcube.plugins }}"
|
|
when: item.repo is defined
|
|
|
|
- name: Symlink custom plugins (1)
|
|
file:
|
|
src: /usr/share/roundcube/plugins/{{ item.name }}
|
|
dest: /var/lib/roundcube/plugins/{{ item.name }}
|
|
state: link
|
|
loop: "{{ roundcube.plugins }}"
|
|
when: item.repo is defined
|
|
|
|
- name: Symlink custom plugins (2)
|
|
file:
|
|
src: /etc/roundcube/plugins/{{ item.name }}
|
|
dest: /usr/share/roundcube/plugins/{{ item.name }}
|
|
state: link
|
|
loop: "{{ roundcube.plugins }}"
|
|
when: item.repo is defined
|
|
|
|
- name: Indicate role in motd
|
|
template:
|
|
src: update-motd.d/05-service.j2
|
|
dest: /etc/update-motd.d/05-roundcube
|
|
mode: 0755
|