|
- ---
-
- - name: stop apache2
- service:
- name: apache2
- state: stopped
-
- - name: delete nextcloud directory
- file:
- path: "{{nextcloud_directory}}"
- state: absent
-
- - name: delete nextcloud lib directory
- file:
- path: "{{nextcloud_lib_directory}}"
- state: absent
- when: nextcloud_reset_lib_directory
-
- - name: drop mysql database
- mysql_db:
- name: "{{nextcloud_database_name}}"
- state: absent
- delegate_to: "{{ (nextcloud_database_host != 'localhost') | ternary(nextcloud_database_host,inventory_hostname) }}"
- when: nextcloud_database_type == "mysql"
-
- - name: drop postgresql database
- postgresql_db:
- name: "{{nextcloud_database_name}}"
- state: absent
- delegate_to: "{{ (nextcloud_database_host != 'localhost') | ternary(nextcloud_database_host,inventory_hostname) }}"
- when: nextcloud_database_type == "postgresql"
- become: yes
- become_user: postgres
-
- - name: delete nextcloud log
- file:
- path: /var/log/nextcloud/nextcloud.log
- state: absent
|