2023-03-17 10:34:15 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- 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
|
2024-05-08 15:34:41 +02:00
|
|
|
- app-update.service
|
|
|
|
- app-update.timer
|
2023-03-17 10:34:15 +01:00
|
|
|
|
|
|
|
- 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
|
2024-05-08 15:34:41 +02:00
|
|
|
- app-update.service
|
|
|
|
- app-update.timer
|
2023-03-17 10:34:15 +01:00
|
|
|
|
|
|
|
- name: Ensure Nextcloud path doesn't exist
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ nextcloud_base_path }}"
|
|
|
|
state: absent
|