--- ## Remove previous app & install new version - name: Remove roundcube previous version ansible.builtin.file: state: absent dest: "{{ roundcube_app_home }}" - name: Create application directory ansible.builtin.file: state: directory dest: "{{ roundcube_app_home }}" owner: "root" group: "www-data" mode: "0o750" - name: Unzip roundcube ansible.builtin.unarchive: remote_src: true src: "{{ roundcube_url }}" dest: "{{ roundcube_app_home }}" owner: root group: www-data mode: "a-rwx,u+rwX,g+rX" extra_opts: ['--strip-components=1'] - name: Put roundcube configuration ansible.builtin.template: src: "config.inc.php.j2" dest: "{{ roundcube_config_path }}" owner: root group: www-data mode: "0o640" - name: Check writable dir ansible.builtin.file: state: directory recurse: true dest: "{{ roundcube_app_home }}/{{ item }}" owner: root group: www-data mode: "g+w" loop: "{{ roundcube_writable_app_dirs }}"