--- - name: Install Roundcube apt: update_cache: true install_recommends: false name: - nginx - 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: Copy NGINX site template: src: nginx/roundcube.j2 dest: /etc/nginx/sites-available/roundcube notify: Restart nginx - name: Activate NGINX site file: src: /etc/nginx/sites-available/roundcube dest: /etc/nginx/sites-enabled/roundcube state: link notify: Restart nginx - name: Indicate role in motd template: src: update-motd.d/05-service.j2 dest: /etc/update-motd.d/05-roundcube mode: 0755