26 lines
796 B
YAML
26 lines
796 B
YAML
---
|
|
|
|
- name: Check existence of Immich systemd service
|
|
ansible.builtin.stat:
|
|
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ immich_identifier }}.service"
|
|
register: immich_service_stat
|
|
|
|
- when: immich_service_stat.stat.exists | bool
|
|
block:
|
|
- name: Ensure Immich systemd service is stopped
|
|
ansible.builtin.service:
|
|
name: "{{ immich_identifier }}"
|
|
state: stopped
|
|
enabled: false
|
|
daemon_reload: true
|
|
|
|
- name: Ensure Immich systemd service does not exists
|
|
ansible.builtin.file:
|
|
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ immich_identifier }}.service"
|
|
state: absent
|
|
|
|
- name: Ensure Immich path doesn't exist
|
|
ansible.builtin.file:
|
|
path: "{{ immich_base_path }}"
|
|
state: absent
|