--- - name: stop apache2 service: name: apache2 state: stopped - name: delete nextcloud directory file: path: "{{nextcloud_directory}}" state: absent - name: drop mysql database mysql_db: name: "{{nextcloud_database_name}}" state: absent delegate_to: "{{ nextcloud_database_host }}" when: nextcloud_database_type == "mysql" - name: delete nextcloud log file: path: /var/log/nextcloud/nextcloud.log state: absent