ansible-role-searxng/tasks/uninstall.yml
Sergio Durigan Junior c888c6d07a
Initial commit
Signed-off-by: Sergio Durigan Junior <sergiodj@sergiodj.net>
2024-12-10 19:35:58 -05:00

25 lines
805 B
YAML

---
- name: Check existence of SearXNG systemd service
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ searxng_identifier }}.service"
register: searxng_service_stat
- when: searxng_service_stat.stat.exists | bool
block:
- name: Ensure SearXNG systemd service is stopped
ansible.builtin.service:
name: "{{ searxng_identifier }}"
state: stopped
enabled: false
daemon_reload: true
- name: Ensure SearXNG systemd service does not exist
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ searxng_identifier }}.service"
state: absent
- name: Ensure SearXNG path doesn't exist
ansible.builtin.file:
path: "{{ searxng_base_path }}"
state: absent