1
0
Fork 0
mash-ansible-role-nextcloud/tasks/uninstall.yml
IUCCA 32fe016c40
added optional systemd service + timer for nextcloud app updates (#17)
* added optional systemd service + timer for nextcloud app updates

* added optional systemd service + timer for nextcloud app updates

* added uninstall tasks
2024-05-08 16:34:41 +03:00

37 lines
1.1 KiB
YAML

---
- name: Check existence of Nextcloud systemd service
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ nextcloud_identifier }}-server.service"
register: nextcloud_service_stat
- when: nextcloud_service_stat.stat.exists | bool
block:
- name: Ensure Nextcloud systemd services are stopped
ansible.builtin.service:
name: "{{ nextcloud_identifier }}-{{ item }}"
state: stopped
enabled: false
daemon_reload: true
with_items:
- server.service
- cron.service
- cron.timer
- app-update.service
- app-update.timer
- name: Ensure Nextcloud systemd services do not exists
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ nextcloud_identifier }}-{{ item }}"
state: absent
with_items:
- server.service
- cron.service
- cron.timer
- app-update.service
- app-update.timer
- name: Ensure Nextcloud path doesn't exist
ansible.builtin.file:
path: "{{ nextcloud_base_path }}"
state: absent