- name: roundcubemail - install package: name: roundcubemail state: latest - name: roundcubemail - create user postgresql_user: login_host: "{{ mailserver_roundcubemail_db_host }}" name: "{{ mailserver_roundcubemail_db_user }}" password: "{{ mailserver_roundcubemail_db_password }}" - name: roundcubemail - create database register: mailserver_roundcubemail_db_create postgresql_db: login_host: "{{ mailserver_roundcubemail_db_host }}" name: "{{ mailserver_roundcubemail_db_name }}" owner: "{{ mailserver_roundcubemail_db_user }}" encoding: UTF-8 lc_collate: en_US.UTF-8 lc_ctype: en_US.UTF-8 # TODO maybe notify - name: roundcubemail - create tables when: mailserver_roundcubemail_db_create.changed postgresql_query: login_host: "{{ mailserver_roundcubemail_db_host }}" login_user: "{{ mailserver_roundcubemail_db_user }}" login_password: "{{ mailserver_roundcubemail_db_password }}" db: "{{ mailserver_roundcubemail_db_name }}" path_to_script: /usr/share/webapps/roundcubemail/SQL/postgres.initial.sql - name: roundcubemail - nginx local notify: reload nginx when: mailserver_roundcubemail_domain == "" template: src: roundcubemail-local.nginx dest: /etc/nginx/local.d/roundcubemail.act - name: roundcubemail - config template: src: roundcubemail-conf.php dest: /etc/webapps/roundcubemail/config/config.inc.php